Page MenuHomeFreeBSD

nlist.3: Clarify which symbol table is used
ClosedPublic

Authored by emaste on Mon, May 18, 3:01 PM.
Tags
None
Referenced Files
F157490654: D57065.id178013.diff
Fri, May 22, 12:40 AM
F157484586: D57065.id178048.diff
Thu, May 21, 11:15 PM
F157471763: D57065.id.diff
Thu, May 21, 8:11 PM
F157470930: D57065.diff
Thu, May 21, 8:00 PM
F157440747: D57065.id178050.diff
Thu, May 21, 12:29 PM
Unknown Object (File)
Wed, May 20, 9:03 PM
Unknown Object (File)
Wed, May 20, 9:20 AM
Unknown Object (File)
Tue, May 19, 4:26 AM
Subscribers

Details

Summary

nlist() currently fetches symbol names only from SHT_SYMTAB.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I would also mention that the function uses section headers to look up symtab, which means that a legitimate binary with sections stripped would not work.

Try to clarify sections. I can put in an explicit reference to strip(1) if you think it's worthwhile.

I do not believe that strip could remove section headers. It is either linker script or linker which would do that, or some more involved ELF editing tool.
Point is that rtld does not need sections at all.

lib/libc/gen/nlist.3
48
This revision is now accepted and ready to land.Mon, May 18, 10:54 PM

I do not believe that strip could remove section headers.

Oh, yes of course, it's the DT_* tags that rtld cares about.

This revision was automatically updated to reflect the committed changes.