[Bug target/125938] Error: operand out of range (0xa648 is not between 0xffffffffffff8000 and 0x7ffc) with -mminimal-toc
"avinashd at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125938
Avinash Jayakar <avinashd at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |avinashd at gcc dot gnu.org,
| |jeevitha at linux dot ibm.com,
| |jskumari at gcc dot gnu.org,
| |meissner at gcc dot gnu.org
--- Comment #2 from Avinash Jayakar <avinashd at gcc dot gnu.org> ---
I think -mminimal-toc uses the mcmodel=small, which restricts the load offsets
by 16 bits. For larger data in globals mcmodel=medium(32 bits) or
mcmodel=large(64 bits) could be used.
But when i use mcmodel=small instead of mminimal-toc, I see just warnings:
/tmp/ccGr4a2L.s: Assembler messages:
/tmp/ccGr4a2L.s: Warning: TOC section size exceeds 64k
Surya/Michael, what should be ideally happening in case where global data
exceeds the offset range addressable by mcmodel, should the compiler throw an
error?