[PATCH 1/1] LoongArch: Add pointer mangling support.
caiyinyu
caiyinyu@loongson.cn
Thu Aug 18 02:25:53 GMT 2022
I sent a new patch: LoongArch: Fix ptr mangling/demangling features.
https://sourceware.org/pipermail/libc-alpha/2022-August/141489.html
And this patch is ok with binutils 2.39, gcc 12.0.1 kernel 5.19+
Tested all passed.
XPASS: conform/UNIX98/ndbm.h/linknamespace
XPASS: conform/XOPEN2K/ndbm.h/linknamespace
XPASS: conform/XOPEN2K8/ndbm.h/linknamespace
XPASS: conform/XPG42/ndbm.h/linknamespace
UNSUPPORTED: crypt/cert
UNSUPPORTED: elf/tst-env-setuid
UNSUPPORTED: elf/tst-env-setuid-tunables
XPASS: elf/tst-protected1a
XPASS: elf/tst-protected1b
UNSUPPORTED: elf/tst-valgrind-smoke
UNSUPPORTED: misc/tst-adjtimex
UNSUPPORTED: misc/tst-clock_adjtime
UNSUPPORTED: misc/tst-ntp_adjtime
UNSUPPORTED: misc/tst-pkey
UNSUPPORTED: misc/tst-rseq
UNSUPPORTED: misc/tst-rseq-disable
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
UNSUPPORTED: nptl/tst-rseq-nptl
UNSUPPORTED: stdlib/tst-secure-getenv
UNSUPPORTED: time/tst-clock_settime
UNSUPPORTED: time/tst-settimeofday
Summary of test results:
4583 PASS
20 UNSUPPORTED
12 XFAIL
6 XPASS
在 2022/8/17 下午3:43, Xi Ruoyao 写道:
> On Tue, 2022-08-16 at 15:23 +0000, Joseph Myers wrote:
>
>>>> No, we must use Binutils-2.40 for new relocation types like %pc_hi20.
>>>> Maybe we can add a configure check to fallback to "la.pcrel"/"la.got"
>>>> macros for Binutils <= 2.39.
>>> Hmm... AFAIK our ld.so is already broken with Binutils <= 2.39, so
>>> perhaps we should just claim Binutils <= 2.39 are not supported.
>> Requiring unreleased versions is bad for users and distributors; it would
>> be better to backport whatever binutils patches are required to 2.39
>> branch (assuming they are LoongArch-specific patches, rather than changes
>> to architecture-independent parts of binutils that are risky for other
>> architectures) and add configure tests to work around any that don't get
>> backported.
> I share your feeling... But the fix needed by ld.so (bc2a35c in
> binutils-gdb.git) is after two commits massively changing the relocation
> types. Backporting the relocation type changes is completely
> unacceptable (such an attempt will do nothing except annoying Nick
> Clifton :). And bc2a35c alone cannot be backported trivially.
>
> I've published a separate version of bc2a35c as the attachment of
> https://sourceware.org/pipermail/libc-alpha/2022-July/140949.html, but
> it's not a trivial backport: I had to change some code where bc2a35a
> does not change or the path for "old" relocation types would just
> overflow the heap buffer and corrupt the heap. And my backport is not
> reviewed or tested carefully.
>
> P. S. Currently building Glibc requires Binutils >= 2.40, but building
> the kernel modules requires Binutils <= 2.39. This effectively forces
> every LoongArch distribution to ship two toolchains :(. I hope we can
> end this madness soon.
>
More information about the Libc-alpha
mailing list