https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109255
David Faust <dfaust at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from David Faust <dfaust at gcc dot gnu.org> ---
This is resolved by 112849 (which really is a duplicate of this bug, but
discussion of the underlying issue is there).
The test is passing when compiled with gcc master:
./test_progs-bpf_gcc
...
#177 linked_vars:OK
And the BTF looks good:
in linked_vars1.bpf.o
[28] VAR 'input_data1' type_id=2, linkage=global
[39] DATASEC '.data' size=0 vlen=2
type_id=25 offset=0 size=4 (VAR 'input_data_weak')
type_id=28 offset=0 size=4 (VAR 'input_data1')
and in linked_vars2.bpf.o
[15] VAR 'input_data1' type_id=2, linkage=extern
[36] DATASEC '.bss' size=0 vlen=6
type_id=19 offset=0 size=4 (VAR 'output_sink2')
type_id=20 offset=0 size=4 (VAR 'output_rodata2')
type_id=21 offset=0 size=4 (VAR 'output_data2')
type_id=22 offset=0 size=4 (VAR 'output_bss2')
type_id=25 offset=0 size=4 (VAR 'input_bss_weak')
type_id=28 offset=0 size=4 (VAR 'input_bss2')
(no wrong entry for input_data1)
*** This bug has been marked as a duplicate of bug 112849 ***