This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: known-elf.awk/known-elf.h
- From: Petr Machata <pmachata at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 01 Apr 2015 17:52:17 +0200
- Subject: Re: known-elf.awk/known-elf.h
Mark Wielaard <mjw@redhat.com> writes:
> On Tue, 2015-03-31 at 17:09 +0200, Petr Machata wrote:
>> Mark Wielaard <mjw@redhat.com> writes:
>>
>> > And you can match against EM_##ARCH in the per-arch executor to select
>> > the correct one for the ELF you are examining?
>>
>> You could do something like this:
>>
>> #define ELF_ONE_KNOWN_DT_ARCH (ARCH) \
>> if (ARCH == my_arch) \
>> { \
>> ELF_ALL_KNOWN_DT_##ARCH \
>> }
>
> Question is how to construct "my_arch". I think we need some macro to
> turn an ehdr.e_machine into an ARCH. Or make sure that ARCH either is an
> e_machine constant value or can easily be turned into one.
Ah, I see what you mean. EM_##ARCH is the e_machine constant.
Thanks,
Petr