bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/12879] New: gold doesn't like .symver name,address@hidden


From: roland at gnu dot org
Subject: [Bug gold/12879] New: gold doesn't like .symver name,address@hidden
Date: Sat, 11 Jun 2011 09:43:56 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12879

           Summary: gold doesn't like .symver name,address@hidden
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden


gold gives a multiple definition error when the same object file defines both
foo and address@hidden symbols, even with same value.  BFD ld accepts this 
usage.
It would perhaps be reasonable to complain if foo and address@hidden did not 
match.

magilla 100 % head ver.s ver.v
==> ver.s <==
    .globl foo
foo:
    .symver foo,address@hidden

==> ver.v <==
VERS1 {
 global:
   foo;
};
magilla 101 % gcc -c ver.s
magilla 102 % ./gold/ld-new -shared -o ver.so ver.o --version-script=ver.v
./gold/ld-new: error: ver.o: multiple definition of 'foo'
./gold/ld-new: ver.o: previous definition here
[Exit 1]
magilla 103 % ./ld/ld-new -shared -o ver.so ver.o --version-script=ver.v
magilla 104 % eu-readelf -s ver.o ver.so

ver.o:


Symbol table [ 5] '.symtab' contains 6 entries:
 4 local symbols  String table: [ 6] '.strtab'
  Num:            Value   Size Type    Bind   Vis          Ndx Name
    0: 0000000000000000      0 NOTYPE  LOCAL  DEFAULT    UNDEF 
    1: 0000000000000000      0 SECTION LOCAL  DEFAULT        1 
    2: 0000000000000000      0 SECTION LOCAL  DEFAULT        2 
    3: 0000000000000000      0 SECTION LOCAL  DEFAULT        3 
    4: 0000000000000000      0 NOTYPE  GLOBAL DEFAULT        1 foo
    5: 0000000000000000      0 NOTYPE  GLOBAL DEFAULT        1 address@hidden

ver.so:


Symbol table [ 2] '.dynsym' contains 6 entries:
 1 local symbol  String table: [ 3] '.dynstr'
  Num:            Value   Size Type    Bind   Vis          Ndx Name
    0: 0000000000000000      0 NOTYPE  LOCAL  DEFAULT    UNDEF 
    1: 0000000000000000      0 OBJECT  GLOBAL DEFAULT      ABS VERS1@@VERS1
    2: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS __bss_start
    3: 0000000000000218      0 NOTYPE  GLOBAL DEFAULT        5 address@hidden
    4: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS _edata
    5: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS _end

Symbol table [ 8] '.symtab' contains 14 entries:
 9 local symbols  String table: [ 9] '.strtab'
  Num:            Value   Size Type    Bind   Vis          Ndx Name
    0: 0000000000000000      0 NOTYPE  LOCAL  DEFAULT    UNDEF 
    1: 00000000000000e8      0 SECTION LOCAL  DEFAULT        1 
    2: 0000000000000118      0 SECTION LOCAL  DEFAULT        2 
    3: 00000000000001a8      0 SECTION LOCAL  DEFAULT        3 
    4: 00000000000001d2      0 SECTION LOCAL  DEFAULT        4 
    5: 00000000000001e0      0 SECTION LOCAL  DEFAULT        5 
    6: 0000000000200218      0 SECTION LOCAL  DEFAULT        6 
    7: 0000000000200218      0 OBJECT  LOCAL  DEFAULT      ABS _DYNAMIC
    8: 0000000000000000      0 OBJECT  LOCAL  DEFAULT      ABS
_GLOBAL_OFFSET_TABLE_
    9: 0000000000000000      0 OBJECT  GLOBAL DEFAULT      ABS VERS1
   10: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS __bss_start
   11: 0000000000000218      0 NOTYPE  GLOBAL DEFAULT        5 address@hidden
   12: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS _edata
   13: 00000000002002f8      0 NOTYPE  GLOBAL DEFAULT      ABS _end
magilla 105 %

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]