]> git.ipfire.org Git - thirdparty/gcc.git/commit
Darwin : Mark the mod init/term section starts with a linker-visible sym.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 29 Aug 2020 21:05:30 +0000 (22:05 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 27 Aug 2021 16:02:12 +0000 (17:02 +0100)
commit66526c6a1c01b6110eaeda94ecc885177c636605
treea1685b98cfb4d36008239837d549c476939f6dc1
parentff6bb9dde10ab665a35bb75527313cd9f7d52f8e
Darwin : Mark the mod init/term section starts with a linker-visible sym.

Some newer assemblers emit section start temp symbols for mod init and term
sections if there is no suitable symbol present already.
The temp symbols are linker visible and therefore appear in the symbol tables.
Since the temp symbol number can vary when debug is enabled, that causes
compare-debug fails.  The solution is to provide a stable linker-visible
symbol.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:

* config/darwin.c (finalize_ctors): Add a section-start linker-
visible symbol.
(finalize_dtors): Likewise.
* config/darwin.h (MIN_LD64_INIT_TERM_START_LABELS): New.
gcc/config/darwin.c
gcc/config/darwin.h