bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21389] New: --version-script --soname is broken


From: hjl.tools at gmail dot com
Subject: [Bug ld/21389] New: --version-script --soname is broken
Date: Fri, 14 Apr 2017 19:50:18 +0000

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

            Bug ID: 21389
           Summary: --version-script --soname is broken
           Product: binutils
           Version: 2.29 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

On Linux/x86, I got

address@hidden soname]$ cat z.c
void x();

void z() {
  x();
}
address@hidden soname]$ make
gcc -B./ -fPIC   -c -o z.o z.c
./ld -soname=libz.so --version-script=z.v -shared -o libz.so.new z.o
objdump -p libz.so.new

libz.so.new:     file format elf64-x86-64

Program Header:
    LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**21
         filesz 0x00000000000002f4 memsz 0x00000000000002f4 flags r-x
    LOAD off    0x0000000000000ed0 vaddr 0x0000000000200ed0 paddr
0x0000000000200ed0 align 2**21
         filesz 0x0000000000000150 memsz 0x0000000000000150 flags rw-
 DYNAMIC off    0x0000000000000ed0 vaddr 0x0000000000200ed0 paddr
0x0000000000200ed0 align 2**3
         filesz 0x0000000000000130 memsz 0x0000000000000130 flags rw-
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**4
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
   RELRO off    0x0000000000000ed0 vaddr 0x0000000000200ed0 paddr
0x0000000000200ed0 align 2**0
         filesz 0x0000000000000130 memsz 0x0000000000000130 flags r--

Dynamic Section:
  SONAME               libz.so
  HASH                 0x0000000000000158
  STRTAB               0x00000000000001e0
  SYMTAB               0x0000000000000180
  STRSZ                0x000000000000001d
  SYMENT               0x0000000000000018
  PLTGOT               0x0000000000201000
  PLTRELSZ             0x0000000000000018
  PLTREL               0x0000000000000007
  JMPREL               0x0000000000000240
  VERDEF               0x0000000000000208
  VERDEFNUM            0x0000000000000002
  VERSYM               0x00000000000001fe

Version definitions:
1 0x01 0x05f4cd17 libz.so.new  <<<<<<<<<<<<<<<<< It should be libz.so.
2 0x00 0x00004662 BAR

address@hidden soname]$ 

This is caused by

commit 902e9fc76a0ec9f642cefa71ef88cca1c675ad54
Author: Maciej W. Rozycki <address@hidden>
Date:   Tue Feb 21 01:46:42 2017 +0000

    PR ld/20828: Move symbol version processing ahead of GC symbol sweep

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