bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/23527] regression (ld-2.30 worked): relocation R_X86_64_PC32 aga


From: slyfox at inbox dot ru
Subject: [Bug ld/23527] regression (ld-2.30 worked): relocation R_X86_64_PC32 against protected symbol `a' can not be used when making a shared object
Date: Wed, 15 Aug 2018 15:12:22 +0000

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

Sergei Trofimovich <slyfox at inbox dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Thank you! Looks like newest clang already adopted the change.
Closing as INVALID. I'll try to find exact llvm commit that fixed it.

$ cat a.c
void a(void) __attribute__((visibility("protected")));
void a(void){}

$ cat b.c
void a(void) __attribute__((visibility("protected")));
void b(void) __attribute__((visibility("protected")));
void b(void) { a(); }

$ cat a.sh
#!/bin/bash

for cc in gcc clang-8 clang-6.0; do
  echo "cc=$cc"
  $cc -O2 -fPIC -c a.c -o a.$cc.o
  $cc -O2 -fPIC -c b.c -o b.$cc.o
  #objdump -d -r a.o b.o
  ld -shared \
      -fPIC \
      -o lib.$cc.so \
      a.$cc.o b.$cc.o "$@"
done

$ LANG=C ./a.sh 
cc=gcc
cc=clang-8
cc=clang-6.0
ld: b.clang-6.0.o: relocation R_X86_64_PC32 against protected symbol `a' can
not be used when making a shared object
ld: final link failed: bad value

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