]> 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>
Sun, 29 May 2022 19:09:05 +0000 (20:09 +0100)
commit3b7661d48293fa7bb4376394007bd47cfa867db2
treead7aa7ec865556586151b99e23bb4b8d63e62228
parent8d16d15d7efcd8f65dd0d289aad26b7ee3b0b2b2
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.

(cherry picked from commit 66526c6a1c01b6110eaeda94ecc885177c636605)
gcc/config/darwin.c
gcc/config/darwin.h