Trouble with dynamic executables

Andrew Duane aduane at juniper.net
Thu Apr 14 18:03:10 UTC 2011


I've pretty much completed my board bringup of an OCTEON based board, but am still battling one *major* issue. Dynamically linked executables do not work at all. Any time I try to run one, I get "Exec format error" (ENOEXEC). Sample output from file is:

Statically linked /bin/cat:

bin/cat:      ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (FreeBSD), for FreeBSD 9.0 (900035), statically linked, FreeBSD-style, not stripped

Dynamically linked /usr/bin/size:

usr/bin/size: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (FreeBSD), for FreeBSD 9.0 (900035), dynamically linked (uses shared libs), FreeBSD-style, not stripped

For now, I've sort of worked around this by editing close to 1000 Makefiles and making almost everything static. There must be a reason for this though. I've done a fresh update and rebuilt everything including the toolchain. Is there something missing from my system? The loader itself? Libraries? An ldscript file?

--

Andrew Duane             Juniper Networks
978-589-0551             10 Technology Park Dr
aduane at juniper.net       Westford, MA  01886-3418
 


More information about the freebsd-mips mailing list