i386 uses _GLOBAL_OFFSET_TABLE_, not __GLOBAL_OFFSET_TABLE_, for GOT symbol
even if on a.out compiler. Yes this is weird, but it is the traditional behavior.
This commit is contained in:
parent
7cc42e6abb
commit
bd6a4107d8
9
gnu/dist/toolchain/gcc/config/i386/i386.c
vendored
9
gnu/dist/toolchain/gcc/config/i386/i386.c
vendored
@ -1725,19 +1725,14 @@ load_pic_register (do_rtl)
|
||||
{
|
||||
emit_insn (gen_prologue_get_pc (xops[0], xops[1]));
|
||||
emit_insn (gen_prologue_set_got (xops[0],
|
||||
#ifdef YES_UNDERSCORES
|
||||
gen_rtx_SYMBOL_REF (Pmode,
|
||||
"$__GLOBAL_OFFSET_TABLE_"),
|
||||
#else
|
||||
gen_rtx_SYMBOL_REF (Pmode,
|
||||
"$_GLOBAL_OFFSET_TABLE_"),
|
||||
#endif
|
||||
xops[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
output_asm_insn (AS1 (call,%X1), xops);
|
||||
output_asm_insn ("addl $%__GLOBAL_OFFSET_TABLE_,%0", xops);
|
||||
output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_,%0", xops);
|
||||
pic_label_rtx = 0;
|
||||
}
|
||||
}
|
||||
@ -1760,7 +1755,7 @@ load_pic_register (do_rtl)
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
|
||||
CODE_LABEL_NUMBER (xops[1]));
|
||||
output_asm_insn (AS1 (pop%L0,%0), xops);
|
||||
output_asm_insn ("addl $%__GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops);
|
||||
output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops);
|
||||
}
|
||||
}
|
||||
|
||||
|
2
gnu/dist/toolchain/gcc/config/i386/i386.md
vendored
2
gnu/dist/toolchain/gcc/config/i386/i386.md
vendored
@ -7031,7 +7031,7 @@ byte_xor_operation:
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
|
||||
CODE_LABEL_NUMBER (operands[1]));
|
||||
output_asm_insn (AS1 (pop%L0,%0), operands);
|
||||
output_asm_insn (\"addl $%__GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands);
|
||||
output_asm_insn (\"addl $_GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands);
|
||||
RET;
|
||||
}"
|
||||
[(set_attr "memory" "none")])
|
||||
|
Loading…
Reference in New Issue
Block a user