This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Code compiled with different flags, especially -O, may have a different line number for the first instruction in a function. This produces false positives in the ODR checker when linking object files that should be ABI-compatible. The best fixes would be to A) look at the DW_AT_decl_line of the DW_TAG_subprogram for the function, but this would require gold to parse a whole new debug section, or B) hash the ODR-relevant aspects of each function into a new dwarf attribute, but this would require gcc to produce the hash and gold to parse a whole new debug section. Instead, loosening the ODR check to allow a function's definitions to be from anywhere within the same file removes the false positives with much less work, and would have caused very few extra false negatives in Google's codebase. 2011-02-02 Jeffrey Yasskin <jyasskin@google.com> * dwarf_reader.h: Add a Source_location type, and change the addr2line functions to return it. * dwarf_reader.cc: Implement Source_location, and change the addr2line functions to return it. * symtab.cc: Sort by just the filename. * object.cc: Convert a Source_location return to a std::string.
Attachment:
looser_odr_check.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |