[PATCH] Add support for ARCv2

Mark Wielaard mark@klomp.org
Tue Nov 1 21:01:40 GMT 2022


Hi Shahab,

On Mon, Oct 31, 2022 at 02:54:33PM +0000, Shahab Vahedi via Elfutils-devel wrote:
> Thank you for response. First and foremost, there is a second iteration of the
> patch [1]. I don't want you, or anybody else, waste time looking into v1. The
> changes from v1 have been mentioned at the end of v2 commit message.

Thanks.

> There is a QEMU target [2]. However, this patch adds a minimal support for ARC.
> I'm not quite sure building and running elfutils natively for ARC would test
> much at this point. That's why I tested with an x86_64 build with ARC target
> support: master + patch -> make check
> 
> Unfortunately, there is no machine in GCC's compile farm. There does exist a
> pre-built compiler [3] and a repo [4] though.

It might be good to add some tests that can be run on a non ARC
architecture just so people can check they didn't break something. See
e.g. tests/run-strip-reloc.sh tests/run-allregs.sh or
tests/run-addrcfi.sh which take small prebuild object files.

> >> ARC target related
> >> macros has been added to libelf/elf.h. However, there a few changes
> >> on existing ARC macros to correct them and be in sync with binutils.
> > 
> > We normally sync with the glibc elf.h, have you submitted these
> > changes to libc-alpha?
> 
> No, but I intend to. In a v2 of the patch [1], I also have added ChangeLog
> entries. It must be easier now to quickly figure out what has changed and
> if it's OK or not.

Thanks. Normally we wait syncing the elf.h file once a patch lands in glibc.

> >> There are no regressions in tests for an x86_64 build.
> >>
> >> ==========================================
> >>    elfutils 0.187: tests/test-suite.log
> >> ==========================================
> >>
> >> .. contents:: :depth: 2
> >>
> >> FAIL: run-backtrace-native-core.sh
> >> ==================================
> >>
> >> backtrace: No modules recognized in core file
> >> backtrace-child-core.8740: no main
> >> rmdir: failed to remove 'test-8732': Directory not empty
> >> FAIL run-backtrace-native-core.sh (exit status: 1)
> >>
> >> FAIL: run-backtrace-native-core-biarch.sh
> >> =========================================
> >>
> >> backtrace: No modules recognized in core file
> >> backtrace-child-biarch-core.8763: no main
> >> rmdir: failed to remove 'test-8755': Directory not empty
> >> FAIL run-backtrace-native-core-biarch.sh (exit status: 1)
> > 
> > These two need abi_cfi hooks to describe the DWARF CFI needed to
> > unwind.
> 
> To be clear, these are the test results on a build without the patch AND
> with the patch. I'm not sure why it happens even without the patch on
> my system. If you want, I can file a bug report with more details.

Aha, sorry, I missed this was on x86_64. That is indeed odd. If you
could file a bug report with your environment where this fails that
would be good.

Thanks,

Mark


More information about the Elfutils-devel mailing list