Skip to content
Snippets Groups Projects
Commit 804254ed authored by Iain Sandoe's avatar Iain Sandoe
Browse files

Darwin: Make sanitizer local vars linker-visible.

Another case where we need a linker-visible symbols in order to
preserve the ld64 atom model.  If these symbols are emitted as
'local' the linker cannot see that they are separate from any
global weak entry that precedes them.  This will cause the linker
to complain that there is (apparently) direct access to such a
weak global, preventing it from being replaced.

This is a short-term fix for the problem - we need generic
handling for relevant cases (that also does not pessimise objects
by emitting unnecessary symbols and relocations).

gcc/ChangeLog:

2020-05-23  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL):
	Make ubsan_{data,type},ASAN symbols linker-visible.
parent 33e09fc5
No related branches found
No related tags found
No related merge requests found
2020-05-23 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Make
ubsan_{data,type},ASAN symbols linker-visible.
2020-05-22 Jan Hubicka <hubicka@ucw.cz>
 
* lto-streamer-out.c (DFS::DFS): Silence warning.
......
......@@ -808,6 +808,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
do { \
if (strcmp ("LC", PREFIX) == 0) \
sprintf (LABEL, "*%s%ld", "lC", (long)(NUM)); \
else if (strcmp ("Lubsan_data", PREFIX) == 0) \
sprintf (LABEL, "*%s%ld", "lubsan_data", (long)(NUM));\
else if (strcmp ("Lubsan_type", PREFIX) == 0) \
sprintf (LABEL, "*%s%ld", "lubsan_type", (long)(NUM));\
else if (strcmp ("LASAN", PREFIX) == 0) \
sprintf (LABEL, "*%s%ld", "lASAN", (long)(NUM));\
else \
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \
} while (0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment