[PATCH] BFD vector for elf32-i386-nacl

H.J. Lu hjl.tools@gmail.com
Tue Jul 26 21:23:00 GMT 2011


On Tue, Jul 26, 2011 at 1:56 PM, Roland McGrath <mcgrathr@google.com> wrote:
> This patch adds the BFD target vector for the new target elf32-i386-nacl.
> This is to support Native Client (http://code.google.com/p/nativeclient/),
> which is a new pseudo-operating system that uses vanilla ELF but has a
> significantly nonstandard ABI.  (It is already known to config.sub as 'nacl'.)
>
> This is far from being complete support for this target, but it should
> be everything that will be needed in BFD proper.  It's gotten only the
> lightest testing, and of course the target-specific details are subject
> to potential fixes or changes later.
>
> I'm floating this early primarily to get feedback about the
> parameterization I've added to the shared elf32-i386.c code.
> The approach I took seems pretty clean to me, and moreso than
> e.g. the way vxworks was handled.
>
> I have tested that the i686-linux target still passes check-binutils and
> check-ld.  I'm not sure that tests much about correct PLT generation,
> which is the only area of the shared code really touched here.  If there
> are other good ways to test that (short of rebuilding a whole OS with
> this linker), please let me know.
>
> Ok for trunk?
>
> Thanks,
> Roland
>
>
> bfd/
> 2011-07-25  Roland McGrath  <mcgrathr@google.com>
>
>        * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
>        (elf_i386_nacl_plt0_entry): New variable.
>        (elf_i386_plt_entry): New variable.
>        (elf_i386_nacl_pic_plt0_entry): New variable.
>        (elf_i386_nacl_pic_plt_entry): New variable.
>        (elf_i386_nacl_arch_bed): New variable.
>        (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
>        (elf_backend_plt_alignment): Likewise.
>
>        * elf32-i386.c (struct elf_i386_backend_data): New type.

We have elf_i386_link_hash_table for similar purpose.  Is that
possible to put elf_i386_backend_data fields there?


H.J.



More information about the Binutils mailing list