[Bug c/11817] New: vargs produce 32 bit signed reference with -mcmodel=medium
hoffman at cray dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 6 01:03:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11817
Summary: vargs produce 32 bit signed reference with -
mcmodel=medium
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hoffman at cray dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
the following snippet of code:
void foo(int a,...)
{
}
produces relocation entries as:
Relocation section '.rela.text' at offset 0x4f8 contains 1 entries:
Offset Info Type Sym. Value Sym. Name + Addend
00000000004b 00020000000b R_X86_64_32S 0000000000000000 .text + 83
Relocation section '.rela.eh_frame' at offset 0x510 contains 1 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000020 000200000001 R_X86_64_64 0000000000000000 .text + 0
which defeats the purpose of using -mcmodel=medium. the intent here
is to link an executable at text=0x80000000, and the signed 32 bit relocation
causes the linker to puke.
-mcmodel=medium does express all other relocations as R_X86_64_64
(except .debug)
More information about the Gcc-bugs
mailing list