fix up Xtensa property section names

Bob Wilson bwilson@tensilica.com
Tue Oct 14 22:47:00 GMT 2003


Xtensa ELF object files contain 2 special "property table" sections.  These 
currently identify the locations of code and literals in the file.  The 
property tables for linkonce section should also be linkonce sections, but 
the naming of these linkonce property sections was inconsistent.  The correct 
names are .gnu.linkonce.v.* or .gnu.linkonce.p.* (someone just picked these 
'v' and 'p' letters arbitrarily but I don't think they conflict with anything 
else right now).  In some cases, the linkonce property section names were 
being formed by appending .xt.insn or .xt.lit to the original .gnu.linkonce.* 
name, which was wrong because it would result in those property sections 
being intermixed with loadable sections after linking.

This patch fixes the bfd xtensa_get_property_section_name function to return 
the correct names for linkonce property sections.  It also fixes up the 
comments in the elf/xtensa.h header regarding these linkonce property section 
names, and fixes the assembler's use of this function to match.

The only other item worth mentioning here is that I'm removing the Xtensa 
port's get_is_linkonce_section -- the only purpose for having this function 
might have been to handle COMDAT linkonce sections but the rest of the code 
will currently only work with .gnu.linkonce sections and at least now it is 
consistent.

Tested by running the testsuites with an xtensa-linux cross target.  Committed 
on the mainline.


bfd ChangeLog:

2003-10-14  Bob Wilson  <bob.wilson@acm.org>

        * elf32-xtensa.c (get_is_linkonce_section): Delete.
        (xtensa_is_property_section, xtensa_is_littable_section): Use
        XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros.  Do not recognize
        linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
        (xtensa_get_property_section_name): Check section name instead of
        calling get_is_linkonce_section.  Remove unused bfd parameter.  Use
        XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros.  Never generate
        linkonce section names by appending ".xt.insn" or ".xt.lit".
        (xtensa_read_table_entries): Remove bfd argument in call to
        xtensa_get_property_section_name.  Free section name when done.
        (elf_xtensa_combine_prop_entries): Free leaking table.

gas ChangeLog:

2003-10-14  Bob Wilson  <bob.wilson@acm.org>

        * config/tc-xtensa.c (xtensa_create_property_segments): Remove bfd
        argument in call to xtensa_get_property_section_name.  Formatting.

include ChangeLog:

2003-10-14  Bob Wilson  <bob.wilson@acm.org>

        * elf/xtensa.h: Formatting.  Fix comments about property section
        names for linkonce sections.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: prop-section.diff
Type: text/x-diff
Size: 8309 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20031014/47253a18/attachment.bin>


More information about the Binutils mailing list