This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/22237] New: Check internal symbols of accessed via PLT or GOT

            Bug ID: 22237
           Summary: Check internal symbols of accessed via PLT or
           Product: glibc
           Version: 2.27
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: at gmail dot com
                CC: drepper.fsp at gmail dot com
        Depends on: 18822
  Target Milestone: ---

If supported by target, internal symbols of should be accessed
without PLT nor GOT.  X86 PLT relocation is checked on libc_pic.a:

[hjl@gnu-efi-2 build-x86_64-linux]$ readelf -rW libc_pic.a | grep " __" | grep
PLT32  | awk '{ print $5 }' | sort | uniq

It assumes that only symbols with "__" prefix are internal symbols.  A
machine-independent script should not be checking names
of relocations.  Instead it needs to look at properties of (global/weak) 
symbols in objects that go into shared libraries.  Symbols (defined or 
undefined) that are not hidden, but are not exported from those shared 
libraries, are suspect, but I'm not sure how reliably GCC will mark 
undefined symbols hidden even given appropriate declarations (and there 
may also be issues with undefined symbols properly called from .S sources 
but not marked hidden there).  So likely lists of exceptions to any such 
tests would be needed (including architecture-specific exceptions for e.g. 
libgcc symbols).

Referenced Bugs:
[Bug 18822] Internal functions are called via PLT
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]