[llvm-bugs] [Bug 33766] New: Implement filter library support (-F /	--filter)
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Wed Jul 12 19:14:09 PDT 2017
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=33766
            Bug ID: 33766
           Summary: Implement filter library support (-F / --filter)
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org
            Blocks: 23214
FreeBSD recently added a dummy libdl as a filter library
(https://reviews.freebsd.org/rS320872) to ease porting of software from Linux,
which expects -ldl to work, and we'd like to support -F/--filter with lld (and
presumably -f/--auxiliary also).
Filter library details are here:
https://docs.oracle.com/cd/E19683-01/817-3677/chapter4-31738/index.html
Using the FreeBSD change as an example, to produce a filter library we add
`-F,libc.so.7`. The primary effect is that the resulting shared object gains a
DT_FILTER entry:
Dynamic section at offset 0xd30 contains 25 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.7]
 0x000000000000000e (SONAME)             Library soname: [libdl.so.1]
 0x000000007fffffff (FILTER)             Filter library: [libc.so.7]
When the runtime loader encounters this it uses the named filtee library
(libc.so.7) to resolve symbols from the filter library.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=23214
[Bug 23214] [META] Using LLD as FreeBSD's system linker
-- 
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/20170713/c75433cf/attachment.html>
    
    
More information about the llvm-bugs
mailing list