Section symbols not getting created. Bug? Is attached patch correct fix?

Dimitry Andric dim@FreeBSD.org
Thu Apr 7 07:09:00 GMT 2011


On 2011-04-06 08:16, John Marino wrote:
...
> Secondly there are numerous __start_* __stop_* in several modules, so to
>    individually declare each one in the command line would tiresome and
> error prone.  It is intentional that these sections are unused, but
> referenced externally by the DragonFly loader.

In FreeBSD, where we just recently updated to 2.17.50 (the last GPLv2
version), we solved this by adding ".globl __start_xxx, __stop_xxx"
statements to the macro that defines the linker sets, e.g:

   http://svn.freebsd.org/changeset/base/215137

This forces the linker to always emit the symbols, and should work even
with stock binutils.



More information about the Binutils mailing list