This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with linking and symbol resolution


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]