aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2021-04-06 05:47:17 +0900
committerStafford Horne <shorne@gmail.com>2021-08-15 07:22:58 +0900
commiteff8110674ef193481d3657456a262beeb9951ff (patch)
tree71adf5ce89c9c912662179f49f2167eaecfec53b /libgcc
parent96194a07bdbc57dd9733892a791d87dbe25f0802 (diff)
downloadgcc-eff8110674ef193481d3657456a262beeb9951ff.zip
gcc-eff8110674ef193481d3657456a262beeb9951ff.tar.gz
gcc-eff8110674ef193481d3657456a262beeb9951ff.tar.bz2
or1k: Add mcmodel option to handle large GOTs
When building libgeos we get an error with: linux-uclibc/9.3.0/crtbeginS.o: in function `__do_global_dtors_aux': crtstuff.c:(.text+0x118): relocation truncated to fit: R_OR1K_GOT16 against symbol `__cxa_finalize' defined in .text section in /home/shorne/work/openrisc/3eb9f9d0f6d8274b2d19753c006bd83f7d536e3c/output/host/or1k-buildroot-linux-uclibc/sysroot/lib/libc.so. This is caused by GOT code having a limit of 64k. In OpenRISC this looks to be the only relocation code pattern to be limited to 64k. This patch allows specifying a new option -mcmodel=large which can be used to generate 2 more instructions to construct 32-bit addresses for up to 4G GOTs. gcc/ChangeLog: PR target/99783 * config/or1k/or1k-opts.h: New file. * config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc): Support generating gotha relocations if -mcmodel=large is specified. * config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE): New macros. * config/or1k/or1k.opt (mcmodel=): New option. * doc/invoke.texi (OpenRISC Options): Document mcmodel.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions