https://sourceware.org/bugzilla/show_bug.cgi?id=34140

            Bug ID: 34140
           Summary: aarch64 stub symbols associated with wrong object
           Product: binutils
           Version: 2.47 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: jbeulich at suse dot com
  Target Milestone: ---

While sections created are associated with the correct input object, symbols
created are appended to the tail of the local symbols part of the (ELF) symbol
table. Thus for consuming tools they become associated with the most recent
STT_FILE symbol, which likely is the wrong one.

For context: In the observed case (linking of Xen binaries) the last input
object represents a generated assembly file, produced in a way similar to
Linux'es kallsyms. Up to now these assembly files didn't have a .file
directive, and hence (to cover the mapping symbols there) for both Arm64 and
Arm32 the linker inserts an STT_FILE symbol with its name derived from the
object files. In the three linking passes involved, that object file name
varies. The symbol name compression used (again inherited from Linux'es
kallsyms) can therefore yield results different enough for the symbol table
embedded into the final binary to not correctly represent its ELF counterpart.
(The plan is to insert .file directives into the generated sources, but the
unhelpful behavior here would better be addressed anyway.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to