bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/7091] Internal error on object generated by gnuld


From: stefan dot becker at nokia dot com
Subject: [Bug gold/7091] Internal error on object generated by gnuld
Date: 11 Dec 2008 09:37:59 -0000

------- Additional Comments From stefan dot becker at nokia dot com  2008-12-11 
09:37 -------
Dooh, no wonder I couldn't make heads or tails out of the backtrace. Should have
thought about that myself :-)

Here is the backtrace generated from a binary compiled with -O0:

(gdb) bt
#0  gold::do_gold_unreachable (                                         
    filename=0x81f1d50 "../../binutils-2.19/gold/object.h", lineno=968, 
    function=0x81f263d "output_symtab_index")                           
    at ../../binutils-2.19/gold/gold.cc:84                              
#1  0x080619d1 in gold::Symbol_value<32>::output_symtab_index (this=0x8a471e0)
    at ../../binutils-2.19/gold/object.h:968                                  
#2  0x08061a2f in gold::Sized_relobj<32, false>::symtab_index (this=0x8a28ab0, 
    sym=0) at ../../binutils-2.19/gold/object.h:1239                           
#3  0x08064a4c in gold::relocate_for_relocatable<32, false, 9> (               
    relinfo=0xbff09670, prelocs=0xb7e45128 "h\v", reloc_count=4329,            
    output_section=0x8c340a0, offset_in_output_section=0, rr=0x8c987f0,        
    view=0xb7d1aff8 "\030", view_address=0, reloc_view=0xb7d78a64 "\022",      
    reloc_view_size=34632) at ../../binutils-2.19/gold/target-reloc.h:479      
#4  0x0805a761 in relocate_for_relocatable (this=0x8a28be0,                    
    relinfo=0xbff09670, sh_type=9, prelocs=0xb7e44e00 "\022",                  
    reloc_count=4329, output_section=0x8c340a0, offset_in_output_section=0,    
    rr=0x8c987f0, view=0xb7d1aff8 "\030", view_address=0, view_size=116096,    
    reloc_view=0xb7d78a64 "\022", reloc_view_size=34632)                       
    at ../../binutils-2.19/gold/i386.cc:2516                                   
#5  0x08142138 in gold::Sized_relobj<32, false>::relocate_sections (           
    this=0x8a28ab0, address@hidden, symtab=0xbff0b0f0, layout=0xbff0af64, 
    pshdrs=0xb7ec5f80 "", pviews=0xbff09718)                                   
    at ../../binutils-2.19/gold/reloc.cc:803                                   
#6  0x081428d2 in gold::Sized_relobj<32, false>::do_relocate (this=0x8a28ab0,  
    address@hidden, symtab=0xbff0b0f0, layout=0xbff0af64, of=0x8da26f0)   
    at ../../binutils-2.19/gold/reloc.cc:486                                   
#7  0x08136046 in gold::Relobj::relocate (this=0x8a28ab0, address@hidden, 
    symtab=0xbff0b0f0, layout=0xbff0af64, of=0x8da26f0)                        
    at ../../binutils-2.19/gold/object.h:628                                   
#8  0x08135cee in gold::Relocate_task::run (this=0x8da27d8)                    
    at ../../binutils-2.19/gold/reloc.cc:164                                   
#9  0x0818f225 in gold::Workqueue::find_and_run_task (this=0xbff0b2d0,         
    thread_number=0) at ../../binutils-2.19/gold/workqueue.cc:314              
#10 0x0818f39e in gold::Workqueue::process (this=0xbff0b2d0, thread_number=0)  
    at ../../binutils-2.19/gold/workqueue.cc:480                               
#11 0x0804b230 in main (argc=5, argv=0xbff0b3d4)                               
    at ../../binutils-2.19/gold/main.cc:219                                    



(gdb) up                                                                       
#1  0x080619d1 in gold::Symbol_value<32>::output_symtab_index (this=0x8a471e0) 
    at ../../binutils-2.19/gold/object.h:968                                   
968         gold_assert(this->output_symtab_index_ != 0);                      
(gdb) l                                                                        
963                                                                            
964       // Return the index in the output symbol table.                      
965       unsigned int                                                         
966       output_symtab_index() const                                          
967       {                                                                    
968         gold_assert(this->output_symtab_index_ != 0);                      
969         return this->output_symtab_index_;                                 
970       }                                                                    
971                                                                            
972       // Set the index in the output symbol table.                         
(gdb) print this
$1 = (const gold::Symbol_value<32> * const) 0x8a471e0


(gdb) up
#2  0x08061a2f in gold::Sized_relobj<32, false>::symtab_index (this=0x8a28ab0,
    sym=0) at ../../binutils-2.19/gold/object.h:1239
1239        return this->local_values_[sym].output_symtab_index();
(gdb) l
1234      // table.  A value of -1U means that the symbol is not being output.
1235      unsigned int
1236      symtab_index(unsigned int sym) const
1237      {
1238        gold_assert(sym < this->local_values_.size());
1239        return this->local_values_[sym].output_symtab_index();
1240      }
1241
1242      // Return the index of local symbol SYM in the dynamic symbol
1243      // table.  A value of -1U means that the symbol is not being output.
(gdb) print this->local_values_[sym]
$6 = (const gold::Symbol_value<32> &) @0x8a471e0: {output_symtab_index_ = 0,
  output_dynsym_index_ = 4294967295, input_shndx_ = 0,
  is_ordinary_shndx_ = false, is_section_symbol_ = false,
  is_tls_symbol_ = false, has_output_value_ = true, u_ = {value = 0,
    merged_symbol_value = 0x0}}

(gdb) print this
$7 = (const class gold::Sized_relobj<32,false> * const) 0x8a28ab0
(gdb) print *this
$8 = {<gold::Relobj> = {<gold::Object> = {_vptr.Object = 0x81ff368, name_ = {
        static npos = 4294967295,                                            
        _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},     
                                
          _M_p = 0x8a28a4c "precompiled_gnuld.a"}}, input_file_ = 0x8a289d8,    
      offset_ = 0, shnum_ = 4883, is_dynamic_ = false, target_ = 0x8a28be0,     
      xindex_ = 0x0},                                                           
    output_sections_ =
{<std::_Vector_base<gold::Output_section*,std::allocator<gold::Output_section*>
>> = {                                                   
        _M_impl = {<std::allocator<gold::Output_section*>> =
{<__gnu_cxx::new_allocator<gold::Output_section*>> = {<No data fields>}, <No
data fields>},        
          _M_start = 0x8a61758, _M_finish = 0x8a663a4,                          
          _M_end_of_storage = 0x8a663a4}}, <No data fields>},                   
    map_to_relocatable_relocs_ = 0x8c344a0, object_merge_map_ = 0x0,            
    relocs_must_follow_section_writes_ = false},                                
  static ehdr_size = <optimized out>, static shdr_size = <optimized out>,       
  static sym_size = <optimized out>, elf_file_ = {                              
    static ehdr_size = <optimized out>, static phdr_size = <optimized out>,     
    static shdr_size = <optimized out>, static sym_size = <optimized out>,      
    static rel_size = <optimized out>, static rela_size = <optimized out>,      
    file_ = 0x8a28ab0, shoff_ = 1478528, shnum_ = 4883, shstrndx_ = 4880,       
    large_shndx_offset_ = 0}, symtab_shndx_ = 4881,                             
  local_symbol_count_ = 4301, output_local_symbol_count_ = 416,                
  output_local_dynsym_count_ = 0,                                               
  symbols_ = {<std::_Vector_base<gold::Symbol*,std::allocator<gold::Symbol*> >>
= {                                                                             
      _M_impl = {<std::allocator<gold::Symbol*>> =
{<__gnu_cxx::new_allocator<gold::Symbol*>> = {<No data fields>}, <No data
fields>}, _M_start = 0x8a57eb8,    
        _M_finish = 0x8a5d9b8,                                                  
        _M_end_of_storage = 0x8a5d9b8}}, <No data fields>},                     
  defined_count_ = 5786, local_symbol_offset_ = 1680988,                        
  local_dynsym_offset_ = 0,                                                     
  local_values_ =
{<std::_Vector_base<gold::Symbol_value<32>,std::allocator<gold::Symbol_value<32>
> >> = {                                                     
      _M_impl = {<std::allocator<gold::Symbol_value<32> >> =
{<__gnu_cxx::new_allocator<gold::Symbol_value<32> >> = {<No data fields>}, <No
data fields>},      
        _M_start = 0x8a471e0, _M_finish = 0x8a57eb0,                            
        _M_end_of_storage = 0x8a57eb0}}, <No data fields>},                     
  local_got_offsets_ = {<std::tr1::_Hashtable<unsigned int,std::pair<const
unsigned int, gold::Got_offset_list*>,std::allocator<std::pair<const unsigned
int, gold::Got_offset_list*> >,std::_Select1st<std::pair<const unsigned int,
gold::Got_offset_list*> >,std::equal_to<unsigned int>,std::tr1::hash<unsigned
int>,std::tr1::__detail::_Mod_range_hashing,std::tr1::__detail::_Default_ranged_hash,std::tr1::__detail::_Prime_rehash_policy,false,false,true>>
=
{<std::tr1::__detail::_Rehash_base<std::tr1::__detail::_Prime_rehash_policy,std::tr1::_Hashtable<unsigned
int, std::pair<const unsigned int, gold::Got_offset_list*>,
std::allocator<std::pair<const unsigned int, gold::Got_offset_list*> >,
std::_Select1st<std::pair<const unsigned int, gold::Got_offset_list*> >,
std::equal_to<unsigned int>, std::tr1::hash<unsigned int>,
std::tr1::__detail::_Mod_range_hashing,
std::tr1::__detail::_Default_ranged_hash,
std::tr1::__detail::_Prime_rehash_policy, false, false, true> >> = {<No data
fields>}, <std::tr1::__detail::_Hash_code_base<unsigned int,std::pair<const
unsigned int, gold::Got_offset_list*>,std::_Select1st<std::pair<const unsigned
int, gold::Got_offset_list*> >,std::equal_to<unsigned
int>,std::tr1::hash<unsigned
int>,std::tr1::__detail::_Mod_range_hashing,std::tr1::__detail::_Default_ranged_hash,false>>
= {                                          
        _M_extract = {<std::unary_function<std::pair<const unsigned int,
gold::Got_offset_list*>,const unsigned int>> = {<No data fields>}, <No data
fields>},  
        _M_eq = {<std::binary_function<unsigned int,unsigned int,bool>> = {<No
data fields>}, <No data fields>},                                               
 
        _M_h1 = {<std::unary_function<unsigned int,unsigned int>> = {<No data
fields>}, <No data fields>},                                                    
  
        _M_h2 = {<No data fields>}}, <std::tr1::__detail::_Map_base<unsigned
int,std::pair<const unsigned int,
gold::Got_offset_list*>,std::_Select1st<std::pair<const unsigned int,
gold::Got_offset_list*> >,true,std::tr1::_Hashtable<unsigned int,
std::pair<const unsigned int, gold::Got_offset_list*>,
std::allocator<std::pair<const unsigned int, gold::Got_offset_list*> >,
std::_Select1st<std::pair<const unsigned int, gold::Got_offset_list*> >,
std::equal_to<unsigned int>, std::tr1::hash<unsigned int>,
std::tr1::__detail::_Mod_range_hashing,
std::tr1::__detail::_Default_ranged_hash,
std::tr1::__detail::_Prime_rehash_policy, false, false, true> >> = {<No data
fields>},                                              
      _M_node_allocator =
{<__gnu_cxx::new_allocator<std::tr1::__detail::_Hash_node<std::pair<const
unsigned int, gold::Got_offset_list*>, false> >> = {<No data fields>}, <No data
fields>}, _M_buckets = 0x8a28ba8, _M_bucket_count = 11,     
      _M_element_count = 0, _M_rehash_policy = {_M_max_load_factor = 1,         
        _M_growth_factor = 2, _M_next_resize = 11}}, <No data fields>},         
  section_offsets_ = {<std::_Vector_base<unsigned int,std::allocator<unsigned
int> >> = {                                                                     
  
      _M_impl = {<std::allocator<unsigned int>> =
{<__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, <No data
fields>}, _M_start = 0x8a663a8,      
        _M_finish = 0x8a6aff4,                                                  
        _M_end_of_storage = 0x8a6aff4}}, <No data fields>},                     
  kept_comdat_sections_ = {_M_t = {                                             
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const unsigned
int, gold::Sized_relobj<32, false>::Kept_comdat_section*> > >> =
{<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const unsigned int,
gold::Sized_relobj<32, false>::Kept_comdat_section*> > >> = {<No data fields>},
<No data fields>},    
        _M_key_compare = {<std::binary_function<unsigned int,unsigned int,bool>>
= {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red,
          _M_parent = 0x0, _M_left = 0x8a28b70, _M_right = 0x8a28b70},
        _M_node_count = 0}}}, comdat_groups_ = {_M_t = {
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const unsigned
int, std::tr1::unordered_map<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, unsigned int, std::tr1::hash<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::equal_to<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, std::allocator<std::pair<conststd::basic_string<char,
std::char_traits<char>, std::allocator<char> >, unsigned int> >, false>*> > >> =
{<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const unsigned int,
std::tr1::unordered_map<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, unsigned int, std::tr1::hash<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::equal_to<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, unsigned int> >, false>*> > >> =
{<No data fields>}, <No data fields>},
        _M_key_compare = {<std::binary_function<unsigned int,unsigned int,bool>>
= {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red,
          _M_parent = 0x8ac7b10, _M_left = 0x8a253a0, _M_right = 0x8bc1a80},
        _M_node_count = 1938}}}, has_eh_frame_ = true}


(gdb) up
#3  0x08064a4c in gold::relocate_for_relocatable<32, false, 9> (
    relinfo=0xbff09670, prelocs=0xb7e45128 "h\v", reloc_count=4329,
    output_section=0x8c340a0, offset_in_output_section=0, rr=0x8c987f0,
    view=0xb7d1aff8 "\030", view_address=0, reloc_view=0xb7d78a64 "\022",
    reloc_view_size=34632) at ../../binutils-2.19/gold/target-reloc.h:479
479                   new_symndx = object->symtab_index(r_sym);
(gdb) l
474           if (r_sym < local_count)
475             {
476               switch (strategy)
477                 {
478                 case Relocatable_relocs::RELOC_COPY:
479                   new_symndx = object->symtab_index(r_sym);
480                   gold_assert(new_symndx != -1U);
481                   break;
482
483                 case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA:

Hope this helps.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=7091

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]