This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [[RESEND & PING]PATCH V3 0/1] Add C-SKY support
On Thu, Jul 11, 2019 at 03:36:03PM +0200, Mark Wielaard wrote:
> > the EM_CSKY_OLD equals to 39. We have changed the EM number to 252 in
> > our newly released toolchain with compatibility to EM_CSKY_OLD.
> > See binutils/include/elf/common.h:
> > /* C-SKY historically used 39, the same value as MCORE, from which
> > the
> > architecture was derived. */
> > #define EM_CSKY_OLD EM_MCORE
>
> Aha. But that is unfortunate on 2 levels. First EM_MCORE isn't an
> official e_machine name. The value 39 is associated with EM_RCE for the
> Morotola RCE. I assume those are the same thing?
>
Yes, they are the same thing.
#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
#define EM_RCE 39 /* Old name for MCore */
> Second, it makes it hard to check the elfutils backend since you'll
> have to comment out all EM_RCE usage, and change the EM_CSKY to the old
> value.
>
> Do you have any binaries/core files generated by an upstream toolchain
> that uses the assigned ELF values? That would be really helpful running
> some tests.
>
I've generated binaries/core with an upstream toolchain, however the
divzero testcase doesn't cause any coredump, so I used a zeroptr
testcase instead.
https://github.com/c-sky/test-result/blob/master/elfutils/zeroptr
https://github.com/c-sky/test-result/raw/master/elfutils/core.zeroptr
Thanks,
Mao Han