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

            Bug ID: 22983
           Summary: --dynamic-list=export is ignored in presence of -flto
           Product: binutils
           Version: 2.31 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

Created attachment 10902
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10902&action=edit
A testcase

[hjl@gnu-cfl-1 pr84901]$ make
gcc  -c -o func.o func.c
gcc  -c -o main.o main.c
gcc -Wl,--dynamic-list=exports -o x func.o main.o
gcc  -flto -c -o func-lto.o func.c
gcc  -flto -c -o main-lto.o main.c
gcc -Wl,--dynamic-list=exports -o x-lto func-lto.o main-lto.o
readelf --dyn-syms x | grep attr_used
     4: 0000000000404024     4 OBJECT  GLOBAL DEFAULT   23
var_attr_used_enabled
     5: 0000000000404028     4 OBJECT  GLOBAL DEFAULT   23
var_attr_used_disabled
     6: 0000000000401121    15 FUNC    GLOBAL DEFAULT   13
func_attr_used_enabled
     7: 0000000000401112    15 FUNC    GLOBAL DEFAULT   13
func_attr_used_disabled
readelf --dyn-syms x-lto | grep attr_used
     4: 0000000000404024     4 OBJECT  GLOBAL DEFAULT   23
var_attr_used_enabled
     5: 0000000000401121    15 FUNC    GLOBAL DEFAULT   13
func_attr_used_enabled
[hjl@gnu-cfl-1 pr84901]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to