bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: reloc


From: thiago at kde dot org
Subject: [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object
Date: Mon, 23 May 2022 03:43:10 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26815

--- Comment #8 from Thiago Macieira <thiago at kde dot org> ---
Oops, these tests aren't using -mno-direct-extern-access at all. When using
them:

$ gcc -O2 -shared -fPIC  -mno-direct-extern-access -fvisibility=protected
-Wl,--dynamic-list,empty.dynlist -o lib.so lib.c
$ gcc -mno-direct-extern-access -O2 -pie -fPIE main.c ./lib.so
$ ./a.out 
addr() = 0x7f932637a028, &variable = 0x7f932637a028

So this is actually working right.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]