Help with linking and symbol resolution
Alan Modra
amodra@gmail.com
Mon Jan 30 04:51:00 GMT 2017
On Sat, Jan 28, 2017 at 08:59:35PM +0530, Lakshay Garg wrote:
> From what I have learnt, I
> believe that the output of the file should be sizeof(c) = 4 since the
> declaration of c in f1.c is weak and would be resolved to the symbol c
> in file f2.c which is strong.
No. (Also don't ignore linker warnings).
Read the C standard regarding sizeof. What is the type of "c" in f1.c?
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list