This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] BFD vector for elf32-i386-nacl
On Tue, Jul 26, 2011 at 2:20 PM, Roland McGrath <email@example.com> wrote:
> elf_i386_link_hash_table is slightly overloaded for such uses (the
> is_vxworks and plt0_pad_byte fields), but IMHO that is a bad kludge. ?The
> main purpose of that structure is for actual per-object data specific to
> the backend. ?What I've added is constant per-backend data that will never
> vary across objects and it would be wasteful to duplicate it in the struct
> elf_i386_link_hash_table for each individual object.
Then can you move some fields from elf_i386_link_hash_table to
> On 7/26/11, H.J. Lu <firstname.lastname@example.org> wrote:
>> On Tue, Jul 26, 2011 at 1:56 PM, Roland McGrath <email@example.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
>>> 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?
>>> 2011-07-25 ?Roland McGrath ?<firstname.lastname@example.org>
>>> ? ? ? ?* 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
>>> ? ? ? ?(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?