[PATCH]: Fix HC11/HC12 linker scripts to put constructors table in rom

Stephane Carrez Stephane.Carrez@worldnet.fr
Tue Nov 13 06:09:00 GMT 2001


Hi!

I've committed the following patch to fix HC11/HC12 linker scripts.
The destructor and constructor table must be in text region (ROM).

	Stephane

2001-11-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
	destructor in rom.
	* scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
-------------- next part --------------
Index: scripttempl/elfm68hc11.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc11.sc,v
retrieving revision 1.6
diff -u -p -r1.6 elfm68hc11.sc
--- elfm68hc11.sc	2001/08/17 09:51:08	1.6
+++ elfm68hc11.sc	2001/11/25 17:22:54
@@ -40,7 +40,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : 
 
     ${CONSTRUCTING+${CTOR_END}}
     ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); }
-  } ${RELOCATING+ > ${DATA_MEMORY}}"
+  } ${RELOCATING+ > ${TEXT_MEMORY}}"
 
 DTOR="  .dtors	${CONSTRUCTING-0} :
   {
@@ -52,7 +52,7 @@ DTOR="  .dtors	${CONSTRUCTING-0} :
     KEEP (*(SORT(.dtors.*)))
     KEEP (*(.dtors)) */
     ${CONSTRUCTING+ PROVIDE(__DTOR_END__ = .); }
-  } ${RELOCATING+ > ${DATA_MEMORY}}"
+  } ${RELOCATING+ > ${TEXT_MEMORY}}"
 
 
 VECTORS="
Index: scripttempl/elfm68hc12.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc12.sc,v
retrieving revision 1.6
diff -u -p -r1.6 elfm68hc12.sc
--- elfm68hc12.sc	2001/08/17 09:51:08	1.6
+++ elfm68hc12.sc	2001/11/25 17:22:55
@@ -40,7 +40,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : 
 
     ${CONSTRUCTING+${CTOR_END}}
     ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); }
-  } ${RELOCATING+ > ${DATA_MEMORY}}"
+  } ${RELOCATING+ > ${TEXT_MEMORY}}"
 
 DTOR="  .dtors	${CONSTRUCTING-0} :
   {
@@ -52,7 +52,7 @@ DTOR="  .dtors	${CONSTRUCTING-0} :
     KEEP (*(SORT(.dtors.*)))
     KEEP (*(.dtors)) */
     ${CONSTRUCTING+ PROVIDE(__DTOR_END__ = .); }
-  } ${RELOCATING+ > ${DATA_MEMORY}}"
+  } ${RELOCATING+ > ${TEXT_MEMORY}}"
 
 
 VECTORS="


More information about the Binutils mailing list