Commit 41655520 authored by Matthias Braun's avatar Matthias Braun
Browse files

amd64: fix PIC output

parent ea540b71
......@@ -524,12 +524,11 @@ static ir_node *gen_Address(ir_node *node)
amd64_addr_t addr;
memset(&addr, 0, sizeof(addr));
addr.base_input = NO_INPUT;
addr.base_input = RIP_INPUT;
addr.index_input = NO_INPUT;
addr.mem_input = NO_INPUT;
if (mode == REFERENCE_IP_RELATIVE) {
addr.base_input = RIP_INPUT;
addr.immediate.entity = entity;
return new_bd_amd64_lea(dbgi, block, 0, NULL, INSN_MODE_64, addr);
} else {
......
......@@ -1323,6 +1323,9 @@ static void emit_global(be_gas_decl_env_t *env, const ir_entity *entity)
/* Block labels are already emitted in the code. */
if (kind == IR_ENTITY_LABEL)
return;
/* GOT entries are created automatically */
if (kind == IR_ENTITY_GOTENTRY)
return;
/* we already emitted all methods with graphs in other functions like
* be_gas_emit_function_prolog(). All others don't need to be emitted. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment