https://sourceware.org/bugzilla/show_bug.cgi?id=32443

--- Comment #3 from Stephen Kell <srk31 at srcf dot ucam.org> ---
(In reply to H.J. Lu from comment #2)
> (In reply to Stephen Kell from comment #0)
> > $ grep . exe.c lib.c lib.lds
> > exe.c:extern void lib_func(void);
> > exe.c:int main(void)
> > exe.c:{
> > exe.c:  lib_func();
> > exe.c:}
> > lib.c:#include <stdio.h>
> > lib.c:extern void value;
> 
> If the above line is changed to:
> 
> extern void value __attribute__ ((visibility("hidden")));
> 
> what should be the expected behavior?

I think it should be unchanged, i.e. I expect 0x2a as the ABS symbol's value.

Caveat: currently struggling to find the relevant ELF spec for the meaning of
an UND symbol of hidden visibility. If it's analogous to protected, I think it
means it should only bind to a hidden def. So the link might fail in the
non-PROVIDE_HIDDEN cases. But if it does link, I would expect the value 0x2a.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to