G'day.
Noticed something odd with the ELF versions on my NetBSD desktop install. I have the following output:
mirage:~/src$ ./test
Test
mirage:~/src$ ldd ./test
ldd: ./test: invalid ELF class 2; expected 1
Seems a little odd. What's a Class 2 in this instance?
Interestingly the distro all seems to be built the same way:
mirage:~/src$ file /opt/fpc-3.2.2-amd64/bin/fp
/opt/fpc-3.2.2-amd64/bin/fp: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for NetBSD, with debug_info, not stripped
mirage:~/src$ ldd /opt/fpc-3.2.2-amd64/bin/fp
ldd: /opt/fpc-3.2.2-amd64/bin/fp: invalid ELF class 2; expected 1
I'm running the latest stable 9.2.
mirage:~/src$ uname -a
NetBSD mirage.local.net 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
mirage:~/src$
Anyone have a clue why it's emitting v2 ELF's? How do you display the library dependencies with this?
/usr/bin/nm seems to dump the symbol table pretty well.
Any ideas welcome.
Regards,
Al.