This is the mail archive of the binutils@sources.redhat.com 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]

Re: [PATCH] more adjustments to elf_find_function


I think this patch is wrong.  If we are generating object files
according to the ELF spec, then any file symbols will come first.

"STT_FILE
    Conventionally, the symbol's name gives the name of the source file
    associated with the object file. A file symbol has STB_LOCAL
    binding, its section index is SHN_ABS, and it precedes the other
    STB_LOCAL symbols for the file, if it is present."

ie. any state machine tracking whether symbols are seen before/after a
file symbol is a waste of time.  If ld -r is not placing all file
symbols at the start, then that's a bug.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]