bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/25591] New: Should /DISCARD/ : { *(.symtab) *(.strtab) } work?


From: i at maskray dot me
Subject: [Bug ld/25591] New: Should /DISCARD/ : { *(.symtab) *(.strtab) } work?
Date: Mon, 24 Feb 2020 05:51:13 +0000

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

            Bug ID: 25591
           Summary: Should /DISCARD/ : { *(.symtab) *(.strtab) } work?
           Product: binutils
           Version: 2.35 (HEAD)
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

In lld,

SECTIONS {
  /DISCARD/ : { *(.symtab) *(.strtab) }
}

can discard the synthesized .symtab and .strtab (probably since
https://reviews.llvm.org/D27040 ).

Discarding .shstrtab is not allowed:

  % ld.lld -T =(printf 'SECTIONS { /DISCARD/ : { *(.shstrtab) }}') a.o -o a
  ld.lld: error: discarding .shstrtab section is not allowed

Discarding *(*) triggers a similar error:

  % ld.lld -T =(printf 'SECTIONS { /DISCARD/ : { *(*) }}') a.o -o a
  ld.lld: error: discarding .shstrtab section is not allowed


GNU ld keeps .symtab, .strtab and .shstrtab

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]