On Tue, 2015-03-31 at 17:09 +0200, Petr Machata wrote: > Mark Wielaard <[email protected]> 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. Cheers, Mark
