This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Can't discard .symtab?


$ readelf -S a.o | grep .symtab
  [ 9] .symtab           SYMTAB           0000000000000000  000003f0
[moz@pent ~]$ cat a.lds
SECTIONS
{
 /DISCARD/ : {
    *(.note.GNU-stack)
    *(.strtab)
    *(.symtab)
 }
}
[moz@pent ~]$ ld -o a -T a.lds a.o
[moz@pent ~]$ readelf -S a | grep .symtab
  [ 7] .symtab           SYMTAB           0000000000000000  00100318
[moz@pent ~]$

.note.GNU-stack was successfully discarded, but I couldn't get rid of
.symtab or .strtab. Am I missing something obvious here? Similarly I
can't get ld to output .symtab in a new section e.g.:

  .foo : { *(.strtab) }

$ ld --version
GNU ld version 2.15.94.0.2.2 20041220

(What I really want to do is assign both sections to a particular
phdr... that doesn't work either, not does objcopy renaming or copying)
 
thanks,
john


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