[PATCH] Add support for ARCv2

Shahab Vahedi Shahab.Vahedi@synopsys.com
Mon Oct 31 14:54:33 GMT 2022


Hi Mark,

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.

[1]
https://sourceware.org/pipermail/elfutils-devel/2022q4/005543.html

Regarding your concerns, please find my answers below.

On 10/30/22 02:29, Mark Wielaard wrote:
> On Fri, Oct 28, 2022 at 01:43:49PM +0000, Shahab Vahedi via Elfutils-devel wrote:
>> This adds support for Synopsys ARCv2 processors.
> 
> Is there an easy way to this this (is there a qemu target or a machine
> in the gcc compile farm)?

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.

[2]
https://github.com/foss-for-synopsys-dwc-arc-processors/qemu

[3]
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2021.09-release

[4]
https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/tree/arc-2021.09

>> 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.

>> 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.

-- 
Shahab



More information about the Elfutils-devel mailing list