This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/23072] New: abi-note.S breaks gABI on 64-bit systems


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

            Bug ID: 23072
           Summary: abi-note.S breaks gABI on 64-bit systems
           Product: glibc
           Version: 2.27
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: kean.johnston at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

http://www.sco.com/developers/gabi/latest/ch5.pheader.html#note_section

The gABI clearly states "In 64-bit objects (files with e_ident[EI_CLASS] equal
to ELFCLASS64), each entry is an array of 8-byte words in the format of the
target processor. In 32-bit objects (files with e_ident[EI_CLASS] equal to
ELFCLASS32), each entry is an array of 4-byte words in the format of the target
processor."

However, csu/abi-note.S incorrectly documents and implements the note fields as
4-byte integers. Any ABI-compliant ELF processor will therefore get invalid
values when processing such note sections.

There are a number of ways this can be fixed, some of which will take
co-operation from the link editor (I will file a bug about this in binutils)
and some of which is in glibc. First, on 64-bit systems the .note section
should *ALWAYS* be aligned on an 8-byte boundary because it is supposed to
contain 8-byte values. So if the link editor correctly sets this alignment it
will be a clue that the .note section is possibly correct. Secondly, the code
in elf/dl-load.c should be trained to correctly detect whether such an existing
.note section used 4-byte words or 8-byte words, again using the segment
alignment as a clue (but not relying on it).

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

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