I created an elf file using the following commend:
objcopy -F elf64-x86-64 -B i386 -I binary binary_file output_file.o
The elf has 3 absolute symbols (binary_start, binray_end, binary_size)
I tried to compile this elf into a shared library.
The probelm is that I can't reach the size_symbol and the end_symbol when I'm using -fpic (The addresses of the symbols are wrong).
so, what is the proper way to use this kind of symbols in position independent code?