Hi Ted,
Sure, here is the stack trace.
#0 0x0807302b in FindElfClassSegment<google_breakpad::ElfClass32> (segment_size=0xbfb05488, segment_start=0xbfb05484, segment_type=4, elf_base=0xaf9b4000 "\177ELF\001\002\001") at ../src/common/linux/elfutils.cc:99
#1 google_breakpad::FindElfSegment (elf_mapped_base=0xaf9b4000, segment_type=4, segment_start=0xbfb05484, segment_size=0xbfb05488, elfclass=0xbfb0548c) at ../src/common/linux/elfutils.cc:183
#2 0x080734a6 in FindElfBuildIDNote (identifier=0xbfb055ac "", elf_mapped_base=0xaf9b4000) at ../src/common/linux/file_id.cc:98
#3 google_breakpad::FileID::ElfFileIdentifierFromMappedFile (base=0xaf9b4000, identifier=0xbfb055ac "") at ../src/common/linux/file_id.cc:144
#4 0x08070d96 in ReadSymbolDataElfClass<google_breakpad::ElfClass32> (out_module=0xbfb0563c, options=..., debug_dirs=..., obj_filename=..., elf_header=0xaf9b4000) at ../src/common/linux/dump_symbols.cc:815
#5 google_breakpad::ReadSymbolDataInternal (obj_file=0xaf9b4000 "\177ELF\001\002\001", obj_filename=..., debug_dirs=..., options=..., module=0xbfb0563c) at ../src/common/linux/dump_symbols.cc:909
#6 0x08071e2f in google_breakpad::ReadSymbolData (obj_file=..., debug_dirs=..., options=..., module=0xbfb0563c) at ../src/common/linux/dump_symbols.cc:943
#7 0x08071ec0 in google_breakpad::WriteSymbolFile (obj_file=..., debug_dirs=..., options=..., sym_stream=...) at ../src/common/linux/dump_symbols.cc:925
#8 0x0804b532 in main (argc=2, argv=0xbfb05744) at ../src/tools/linux/dump_syms/dump_syms.cc:82
If I comment the FindElfBuildIDNote knowing that this linker does not support build-id then it crashes in FindElfClassSection when trying to calculate the hash using the text section.
#0 0x0808bd9b in void google_breakpad::(anonymous namespace)::FindElfClassSection<google_breakpad::ElfClass32>(char const*, char const*, google_breakpad::ElfClass32::Word, void const**, int*) ()
#1 0x0808c045 in google_breakpad::FindElfSection(void const*, char const*, unsigned int, void const**, int*, int*) ()
#2 0x0808c4ad in google_breakpad::HashElfTextSection(void const*, unsigned char*) ()
#3 0x0808c60c in google_breakpad::FileID::ElfFileIdentifierFromMappedFile(void const*, unsigned char*) ()
#4 0x080876cb in bool (anonymous namespace)::ReadSymbolDataElfClass<google_breakpad::ElfClass32>(google_breakpad::ElfClass32::Ehdr const*, std::string const&, std::vector<std::string, std::allocator<std::string> > const&, google_breakpad::DumpOptions const&, google_breakpad::Module**) ()
#5 0x08087f35 in google_breakpad::ReadSymbolDataInternal(unsigned char const*, std::string const&, std::vector<std::string, std::allocator<std::string> > const&, google_breakpad::DumpOptions const&, google_breakpad::Module**) ()
#6 0x0808804e in google_breakpad::ReadSymbolData(std::string const&, std::vector<std::string, std::allocator<std::string> > const&, google_breakpad::DumpOptions const&, google_breakpad::Module**) ()
#7 0x080880e0 in google_breakpad::WriteSymbolFile(std::string const&, std::vector<std::string, std::allocator<std::string> > const&, google_breakpad::DumpOptions const&, std::ostream&) ()
#8 0x0808d967 in main ()
The hello world binary for this exercise compiled as a target is attached.
Target gcc version is 4.2.0 and ld version is 2.17
Thanks for your help!
Vishal