This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Target specific Relobj?
- From: =?big5?b?RG91ZyBLd2FuICjD9q62vHcp?= <dougkwan at google dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 16 Aug 2009 03:14:22 -0700
- Subject: Re: Target specific Relobj?
- References: <498552560908160241o52109b9bic6919898f73c485f@mail.gmail.com>
I looked at the code and found I need a few adjustment of the proposed change.
-Targets have size and endianity, so there is no need to pass size and
endianity to target-specific make_elf_sized_object.
-make_elf_sized_object takes a elfcpp::Ehdr<size, big_endian>& ehdr as
parameter, I would change this back to a plain unsigned char pointer
so that we only need one hook, instead of 4.
-Doug
2009/8/16 Doug Kwan (Ãö®¶¼w) <dougkwan@google.com>:
> Hi Ian,
>
> I need to attach some ARM specific information to Relobj objects.
> To do that I can think of two ways
>
> 1. Use an Unordered_map<Relobj*, Arm_specific_info*>
> 2. Sub-classing Relobj (or Sized_relobj)
>
> I actually prefer 2. I would like to check make_elf_sized_object() to
> check if a target has its own make_elf_sized_object. If so, it calls
> the target's own version. We'll need to pass size and big_endian as
> two extra parameters. What do you think?
>
> -Doug
>