]> git.ipfire.org Git - thirdparty/gcc.git/commit
Darwin: Match system sections and relocs for exception tables.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 31 Aug 2023 18:20:43 +0000 (19:20 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 18 Apr 2024 14:46:19 +0000 (15:46 +0100)
commit71e3f9f5ec7516fa67d004974445821eea5a3342
tree339db59f6398bcad3addc92315e1d3d09e819e76
parent23fa5cdd4cd0feb6580e1451c3ad849b24cfa570
Darwin: Match system sections and relocs for exception tables.

System tools from Darwin10 onwards have moved the exceptions tables from
the __DATA segment to the __TEXT one.  They also revised the relocations
used for typeinfo.  While Darwin9 was not changed at the time, in fact the
tools there are equally happy with the revised scheme - and therefore at
present there seems no reason to special-case it.

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

* config/darwin-sections.def (darwin_exception_section): Move to
the __TEXT segment.
* config/darwin.cc (darwin_emit_except_table_label): Align before
the exception table label.
* config/darwin.h (ASM_PREFERRED_EH_DATA_FORMAT): Use indirect PC-
relative 4byte relocs.

(cherry picked from commit 0fe7962afc7c01488432b98b6f442b24946a490d)
gcc/config/darwin-sections.def
gcc/config/darwin.cc
gcc/config/darwin.h