From 610e0cb499a807287320fb13701cdee373a0a091 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Fri, 17 Mar 2017 15:37:29 -0700 Subject: [PATCH] Change the global pointer symbol to __global_pointer$ This changed a while ago in binutils. --- benchmarks/common/crt.S | 2 +- benchmarks/common/test.ld | 2 +- debug/programs/entry.S | 2 +- debug/targets/freedom-e300-sim/link.lds | 2 +- debug/targets/freedom-e300/link.lds | 2 +- debug/targets/freedom-u500-sim/link.lds | 2 +- debug/targets/freedom-u500/link.lds | 2 +- debug/targets/spike/link.lds | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index 3d4d6cf..3e6cee4 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -111,7 +111,7 @@ _start: csrw mtvec, t0 # initialize global pointer - la gp, _gp + la gp, __global_pointer$ la tp, _end + 63 and tp, tp, -64 diff --git a/benchmarks/common/test.ld b/benchmarks/common/test.ld index 8141dda..a08d71d 100644 --- a/benchmarks/common/test.ld +++ b/benchmarks/common/test.ld @@ -32,7 +32,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) } diff --git a/debug/programs/entry.S b/debug/programs/entry.S index a5e745d..b507a93 100755 --- a/debug/programs/entry.S +++ b/debug/programs/entry.S @@ -35,7 +35,7 @@ handle_reset: csrwi mie, 0 # initialize global pointer - la gp, _gp + la gp, __global_pointer$ # initialize stack pointer la sp, stack_top diff --git a/debug/targets/freedom-e300-sim/link.lds b/debug/targets/freedom-e300-sim/link.lds index 1dbb99c..1e0645a 100755 --- a/debug/targets/freedom-e300-sim/link.lds +++ b/debug/targets/freedom-e300-sim/link.lds @@ -13,7 +13,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) diff --git a/debug/targets/freedom-e300/link.lds b/debug/targets/freedom-e300/link.lds index 1dbb99c..1e0645a 100755 --- a/debug/targets/freedom-e300/link.lds +++ b/debug/targets/freedom-e300/link.lds @@ -13,7 +13,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) diff --git a/debug/targets/freedom-u500-sim/link.lds b/debug/targets/freedom-u500-sim/link.lds index 1dbb99c..1e0645a 100755 --- a/debug/targets/freedom-u500-sim/link.lds +++ b/debug/targets/freedom-u500-sim/link.lds @@ -13,7 +13,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) diff --git a/debug/targets/freedom-u500/link.lds b/debug/targets/freedom-u500/link.lds index 1dbb99c..1e0645a 100755 --- a/debug/targets/freedom-u500/link.lds +++ b/debug/targets/freedom-u500/link.lds @@ -13,7 +13,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) diff --git a/debug/targets/spike/link.lds b/debug/targets/spike/link.lds index 52e4472..b86b2b7 100755 --- a/debug/targets/spike/link.lds +++ b/debug/targets/spike/link.lds @@ -15,7 +15,7 @@ SECTIONS .data : { *(.data) } .sdata : { - _gp = . + 0x800; + __global_pointer$ = . + 0x800; *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*) *(.sdata .sdata.* .gnu.linkonce.s.*) -- 2.30.2