Re: relocation information disappears

2017-04-11 Thread Katsuya TANAKA
> I assume that you mean "readelf -D -r w" here, as you are looking for dynamic relocs ? ... 96e4 0b14 R_ARM_COPY96e4 debug_f found. > What happens when you run the compiled w.c test program ? Is there a seg-fault for > accessing memory at address 0 ? Yes. I switched to

Re: relocation information disappears

2017-04-07 Thread Jim Wilson
On 04/06/2017 04:20 AM, Katsuya TANAKA wrote: # ~/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -march=armv7-a -o w w.c ~/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-readelf -r w There is no "debug_f" symbol. Why not? The value of a weak symbol is

Re: relocation information disappears

2017-04-07 Thread Nick Clifton
Hi Katsuya, > # ~/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-readelf > -r w I assume that you mean "readelf -D -r w" here, as you are looking for dynamic relocs ? > Relocation section '.rel.dyn' at offset 0x270 contains 1 entries: > Offset InfoType

relocation information disappears

2017-04-06 Thread Katsuya TANAKA
w.c #include extern int debug_f __attribute__ ((weak)); int main(int, char *[]); int main(int argc, char *argv[]) { printf("flag %d", debug_f); } w.c # ~/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -march=armv7-a -o w w.c #