This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Define __start/__stop symbols when there is only a dynamic def
On Mon, Jan 29, 2018 at 04:39:15PM -0800, H.J. Lu wrote:
> +extern int __start___verbose[];
> +extern int __stop___verbose[];
> +int
> +foo3 (void)
> +{
> + if (__start___verbose == __stop___verbose
> + || __start___verbose[0] != 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.
--
Alan Modra
Australia Development Lab, IBM