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

            Bug ID: 33292
           Summary: Linker does not prune empty GNU_PROPERTY_1_NEEDED
           Product: binutils
           Version: 2.46 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: sam at gentoo dot org
                CC: hjl.tools at gmail dot com
  Target Milestone: ---

```
$ cat dummy.s
# Dummy
        .section        ".note.GNU-stack"
$ gcc -O2 -mno-direct-extern-access -c dummy.s -o dummy.o # use
-mno-direct-extern-access to add GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS
$ gcc -shared -Wl,-z,lam-u57,-z,noindirect-extern-access -z nomemory-seal
dummy.o -o lam-u57.so # use -z noindirect-extern-access to prune
GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS
$ readelf -n lam-u57.so

Displaying notes found in: .note.gnu.build-id
  Owner                Data size        Description
  GNU                  0x00000014       NT_GNU_BUILD_ID (unique build ID
bitstring)
    Build ID: d8d038adbf56a7e9a8edad67a8e35b488cfe03b6

Displaying notes found in: .note.gnu.property
  Owner                Data size        Description
  GNU                  0x00000040       NT_GNU_PROPERTY_TYPE_0
      Properties: 1_needed: # <----- blank entry should be pruned
        x86 feature: LAM_U57
        x86 feature used: x86
        x86 ISA used: x86-64-baseline
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to