I compiled a C++ HelloWorld on an Odroid-XU3 with gcc/g++ version 4.8.2 and clang version 3.5. I also wrote a C HelloWorld for comparison.
g++ -static -o HelloWorld hello.cc
readelf -h HelloWorld
shows the following entry point addresses:
HelloWorld: 0x8be5
HelloClang: 0x8c45
HelloC: 0x88b5
These are odd addresses. Thumb has odd addresses, so has this something to do with Thumb?
Additionally, objdump -lSd HelloWorld
shows the _start
Symbol at 0x8be4
, which looks like the "right" address.
Why show these two tools different addresses?