public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99783] relocation truncated to fit: R_OR1K_GOT16 on OpenRISC, building libgeos
Date: Sat, 14 Aug 2021 22:23:23 +0000	[thread overview]
Message-ID: <bug-99783-4-GRP0pChpw5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99783-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99783

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Stafford Horne <shorne@gcc.gnu.org>:

https://gcc.gnu.org/g:eff8110674ef193481d3657456a262beeb9951ff

commit r12-2909-geff8110674ef193481d3657456a262beeb9951ff
Author: Stafford Horne <shorne@gmail.com>
Date:   Tue Apr 6 05:47:17 2021 +0900

    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.

  parent reply	other threads:[~2021-08-14 22:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  6:52 [Bug target/99783] New: " shorne at gcc dot gnu.org
2021-03-26  6:53 ` [Bug target/99783] " shorne at gcc dot gnu.org
2021-08-14 21:03 ` giulio.benetti at benettiengineering dot com
2021-08-14 22:23 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-14 22:23 ` cvs-commit at gcc dot gnu.org
2021-12-30 20:34 ` giulio.benetti at benettiengineering dot com
2021-12-30 21:59 ` shorne at gmail dot com
2021-12-31  0:14 ` shorne at gmail dot com
2021-12-31 11:26 ` giulio.benetti at benettiengineering dot com
2022-01-01  7:23 ` shorne at gmail dot com
2022-01-02  0:04 ` shorne at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99783-4-GRP0pChpw5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).