bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/30768] New: X86: copy relocation against non-copyable protected


From: xiezhiheng at huawei dot com
Subject: [Bug ld/30768] New: X86: copy relocation against non-copyable protected symbol
Date: Wed, 16 Aug 2023 02:23:31 +0000

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

            Bug ID: 30768
           Summary: X86: copy relocation against non-copyable protected
                    symbol
           Product: binutils
           Version: 2.40
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: xiezhiheng at huawei dot com
  Target Milestone: ---

Hi,
  I recently met a link error when I built glibc-2.38 with binutils 2.40. The
error is

[ 1568s] /usr/bin/ld:
/home/abuild/rpmbuild/BUILD/glibc-2.38/build-x86_64-openEuler-linux/elf/vismain.o:
copy relocation against non-copyable protected symbol `protvaritcpt' in
/home/abuild/rpmbuild/BUILD/glibc-2.38/build-x86_64-openEuler-linux/elf/vismod1.so
[ 1568s] collect2: error: ld returned 1 exit status
[ 1568s] make[2]: *** [../Rules:276:
/home/abuild/rpmbuild/BUILD/glibc-2.38/build-x86_64-openEuler-linux/elf/vismain]
Error 1
[ 1568s] make[2]: Leaving directory
'/home/abuild/rpmbuild/BUILD/glibc-2.38/elf'
[ 1568s] make[2]: Entering directory
'/home/abuild/rpmbuild/BUILD/glibc-2.38/elf'

(Complete log at
https://build.openeuler.openatom.cn/public/build/openEuler:23.09/standard_x86_64/x86_64/glibc/_log)

It is okay before I update binutils 2.37 to binutils 2.40.
I find that the error message is introduced by
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ebb191adac4ab45498dec0bfaac62f0a33537ba4
since binutils 2.38 to disallow copy relocation against the non-copyable
protected symbol.

But the symbols are defined in glibc with
    const char *protvaritcpt = __FILE__;
    asm (".protected protvaritcpt");

I'm not sure if it is a compatibility issue between glibc-2.38 and binutils
2.40, and one of them need to be adapted in some way.

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