Compilers and linkers put their own version information in ELF binaries; we can inspect
with readelf
on the .comment
section, to wit:
Universal ctags points the cursor to
line numbers rather than the actual definition (as language servers do). Vim
uses ex (:h Ex-mode
) commands as destinations.
We want to generate call cursor(line,col)
for each identifier.
nm
shows symbols defined in an executable. GHC includes library name in
symbols, so we can use this to inspect libraries that make it into the compiled
binary. GHC uses z-encoding so we pipe the output of nm
into an ad-hoc invocation of sed, viz.
GHC embeds linker flags into the final ELF binary:
I turned to my own Jacinda to view the output of otool and was pleasantly surprised.
next