]> git.ipfire.org Git - thirdparty/gcc.git/commit
libiberty, Darwin : Fix simple-object LTO table for cross-endian case.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 9 Apr 2021 12:40:11 +0000 (13:40 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 14 Apr 2022 05:21:27 +0000 (06:21 +0100)
commit65e090628fc21c65c6aa294a89b3cd6324adc5d8
tree2203a969516ed07e2154098dc18c2436227edac3
parenta34305f0de9e784783253ae0735ed26533fe59a1
libiberty, Darwin : Fix simple-object LTO table for cross-endian case.

We encapsulate streamed IR in three special sections with a table
that describes their entries.  The table is expected to be written
with native endianness for the target, but for cross-endian cross-
compilation the swapping was omitted.  Fixed thus.

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

* simple-object-mach-o.c (simple_object_mach_o_write_segment):
Arrange to swap the LTO index tables where needed.

(cherry picked from commit 220c410162ebece4fffa2912ed79e348d3731d77)
libiberty/simple-object-mach-o.c