[PATCH] LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE
Xi Ruoyao
xry111@xry111.site
Wed Aug 14 09:26:10 GMT 2024
On Wed, 2024-08-14 at 17:20 +0800, Lulu Cai wrote:
> > For pie, should we reject pc-relative jump abs symbol?
> >
>
> Well, I'm not sure if this is necessary. I haven't found any other ports
> that do this.
x86_64 port rejects this:
$ cat test.s
.globl _start
_start:
jmp a
$ cat test1.s
.globl a
.set a, 0x100
$ cc test.s test1.s -nostdlib -pie
/usr/bin/ld: /tmp/ccjW2d7L.o: relocation R_X86_64_PLT32 against absolute symbol `a' in section `.text' is disallowed
collect2: error: ld returned 1 exit status
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
More information about the Binutils
mailing list