[PATCH] clean up elf32-i386-vxworks hooking mechanism

H.J. Lu hjl.tools@gmail.com
Wed Jul 27 22:35:00 GMT 2011
On Wed, Jul 27, 2011 at 2:49 PM, Roland McGrath <mcgrathr@google.com> wrote:
> This cleans up the BFD elf32-i386 target vector to put its
> backend-specific parameters into a new struct hung off of struct
> elf_backend_data rather than overloading struct elf_i386_link_hash_table
> for this purpose.  The latter is actual dynamic state.  The former is
> just a constant table that varies by particular backend.
>
> I tested that this showed no regressions for --target=i686-wrs-vxworks
> compared to the unmodified trunk.  However, since I don't actually have
> vxworks, I'm not sure how thorough my testing really was.  To be able to
> do any tests at all, I built gcc --target=i686-wrs-vxworks from the 4.6
> branch.  But I was not able to do a really usable build, i.e. no libgcc,
> just gcc itself (--enable-languages=c).  The results (both before and
> after this bfd change) look like this:
>
>                        === binutils Summary ===
>
>        # of expected passes            72
>        # of expected failures          1
>        # of untested testcases         8
>        # of unsupported tests          9
>
>                        === ld Summary ===
>
>        # of expected passes            58
>        # of expected failures          5
>        # of untested testcases         12
>        # of unsupported tests          13
>
> Ok for trunk?
>
>
> Thanks,
> Roland
>
>
> bfd/
> 2011-07-27  Roland McGrath  <mcgrathr@google.com>
>
>        * elf32-i386.c (struct elf_i386_backend_data): New type.
>        (get_elf_i386_backend_data): New macro.
>        (elf_i386_arch_bed): New variable.
>        (elf_backend_arch_data): New macro.
>        (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
>        (elf_i386_link_hash_table_create): Don't initialize them.
>        (elf_i386_create_dynamic_sections): Find is_vxworks flags in
>        elf_i386_backend_data, not elf_i386_link_hash_table.
>        (elf_i386_adjust_dynamic_symbol): Likewise.
>        (elf_i386_allocate_dynrelocs): Likewise.
>        (elf_i386_readonly_dynrelocs): Likewise.
>        (elf_i386_size_dynamic_sections): Likewise.
>        (elf_i386_relocate_section): Likewise.
>        (elf_i386_finish_dynamic_symbol): Likewise.
>        (elf_i386_finish_dynamic_sections): Likewise.  Same for plt0_pad_byte.
>        (elf_i386_vxworks_link_hash_table_create): Function removed.
>        (elf_i386_vxworks_arch_bed): New variable.
>        (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
>
>        * elf-bfd.h (elf_backend_data): New member arch_backend_data.
>        * elfxx-target.h (elf_backend_arch_data): New macro.
>        (elfNN_bed): Use it as initializer for the new member.
>

elf32-i386.c change is OK.

Thanks.

-- 
H.J.



More information about the Binutils mailing list