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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
gABI has

sh_entsize
Some sections hold a table of fixed-size entries, such as a symbol table. For
such a section, this member gives the size in bytes of each entry. The member
contains 0 if the section does not hold a table of fixed-size entries.

SHF_MERGE
The data in the section may be merged to eliminate duplication. Unless the
SHF_STRINGS flag is also set, the data elements in the section are of a uniform
size. The size of each element is specified in the section header's sh_entsize
field. If the SHF_STRINGS flag is also set, the data elements consist of
null-terminated character strings. The size of each character is specified in
the section header's sh_entsize field.
Each element in the section is compared against other elements in sections with
the same name, type and flags. Elements that would have identical values at
program run-time may be merged. Relocations referencing elements of such
sections must be resolved to the merged locations of the referenced values.
Note that any relocatable values, including values that would result in
run-time relocations, must be analyzed to determine whether the run-time values
would actually be identical. An ABI-conforming object file may not depend on
specific elements being merged, and an ABI-conforming link editor may choose
not to merge specific elements.

SHF_STRINGS
The data elements in the section consist of null-terminated character strings.
The size of each character is specified in the section header's sh_entsize
field.

We should set sh_entsize only if SHF_MERGE or SHF_STRINGS bits are set.

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

Reply via email to