Define __start/__stop symbols when there is only a dynamic def
Tue Jan 30 01:40:00 GMT 2018
On Mon, Jan 29, 2018 at 4:50 PM, Alan Modra <firstname.lastname@example.org> wrote:
> On Mon, Jan 29, 2018 at 04:39:15PM -0800, H.J. Lu wrote:
>> +extern int __start___verbose;
>> +extern int __stop___verbose;
>> +foo3 (void)
>> + if (__start___verbose == __stop___verbose
>> + || __start___verbose != 6)
>> + return -1;
>> + else
>> + return 0;
>> Which __start___verbose/_start___verbose definition should it
>> reference at run-time? There are more than one.
> They should be resolved as for any other symbol in an ELF shared
> library. The test is verifying that we don't resolve to
> __start/__stop symbols in another shared library's __verbose section
> if there is a __verbose section in the executable.
Can you add another testcase with -Wl,--gc-sections on executable?
More information about the Binutils