[llvm-bugs] [Bug 37724] New: llvm-readobj --version-info assumes first symbol version is base version

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 6 19:24:57 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37724

            Bug ID: 37724
           Summary: llvm-readobj --version-info assumes first symbol
                    version is base version
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mh+llvm at glandium.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 20399
  --> https://bugs.llvm.org/attachment.cgi?id=20399&action=edit
foo executable

The output of readobj --version-info for the attached file is the following:

File: foo
Format: ELF64-x86-64
Arch: x86_64
AddressSize: 64bit
LoadName: 
Version symbols {
  Section Name: .gnu.version (130)
  Address: 0x408
  Offset: 0x408
  Link: 4
  Symbols [
    Symbol {
      Version: 0
      Name: @
    }
    Symbol {
      Version: 2
      Name: __libc_start_main at GLIBC_2.2.5
    }
    Symbol {
      Version: 2
      Name: __cxa_finalize at GLIBC_2.2.5
    }
    Symbol {
      Version: 0
      Name: _ITM_registerTMCloneTable@
    }
    Symbol {
      Version: 0
      Name: _ITM_deregisterTMCloneTable@
    }
    Symbol {
      Version: 0
      Name: __gmon_start__@
    }
    Symbol {
      Version: 1
      Name: foo@
    }
    Symbol {
      Version: 1
      Name: FOO@
    }
  ]
}
SHT_GNU_verdef {
  Definition {
    Version: 1
    Flags: 0x0
    Index: 1
    Hash: 19263
    Name: FOO
  }
}
SHT_GNU_verneed {
  Dependency {
    Version: 1
    Count: 1
    FileName: libc.so.6
    Entry {
      Hash: 157882997
      Flags: 0x0
      Index: 2
      Name: GLIBC_2.2.5
    }
  }
}

It's rather unconventional that SHT_GNU_verdef doesn't contain a definition
with Flags: Base, but that can happen thanks to GNU gold doing weird things.
Anyways, the point is, symbols foo and FOO should appear as foo@@FOO and
FOO@@FOO, not foo@ and FOO at .

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180607/24faa25a/attachment.html>


More information about the llvm-bugs mailing list