This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --gc-sections and -r


This should avoid the need for the 2010-10-28 change.

	* scripttempl/v850.sc: Don't reference __ctbp, __ep, __gp when
	not relocating.
	* scripttempl/v850_rh850.sc: Likewise.

diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index cf7cd20..9ff5e9a 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -16,7 +16,7 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850",
 OUTPUT_ARCH(v850:old-gcc-abi)
 ${RELOCATING+ENTRY(_start)}
 SEARCH_DIR(.);
-EXTERN(__ctbp __ep __gp);
+${RELOCATING+EXTERN(__ctbp __ep __gp)};
 SECTIONS
 {
   /* This saves a little space in the ELF file, since the zda starts
diff --git a/ld/scripttempl/v850_rh850.sc b/ld/scripttempl/v850_rh850.sc
index a44b9b5..b54e956 100644
--- a/ld/scripttempl/v850_rh850.sc
+++ b/ld/scripttempl/v850_rh850.sc
@@ -16,7 +16,7 @@ OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
 OUTPUT_ARCH(v850:rh850)
 ${RELOCATING+ENTRY(_start)}
 SEARCH_DIR(.);
-EXTERN(__ctbp __ep __gp);
+${RELOCATING+EXTERN(__ctbp __ep __gp)};
 SECTIONS
 {
   /* This saves a little space in the ELF file, since the zda starts

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]