From: Stephane Carrez <stcarrez@nerim.fr>
To: binutils@sources.redhat.com
Subject: [PATCH]: Use KEEP for some HC11/HC12 sections
Date: Sun, 13 Oct 2002 02:30:00 -0000 [thread overview]
Message-ID: <3DA95953.7080300@nerim.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
Hi!
To prevent the GC to remove some HC11/HC12 special sections (vectors, startup code
and finish code), these sections must be marked with KEEP.
I've committed this patch to fix that.
Stephane
2002-10-13 Stephane Carrez <stcarrez@nerim.fr>
* scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
.finiN section.
* scripttempl/elfm68hc12.sc: Likewise.
[-- Attachment #2: elf-scripts.diffs --]
[-- Type: text/plain, Size: 3732 bytes --]
Index: scripttempl/elfm68hc11.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc11.sc,v
retrieving revision 1.9
diff -u -p -r1.9 elfm68hc11.sc
--- scripttempl/elfm68hc11.sc 30 Sep 2002 09:31:31 -0000 1.9
+++ scripttempl/elfm68hc11.sc 13 Oct 2002 09:28:13 -0000
@@ -75,7 +75,7 @@ VECTORS="
PROVIDE (_vectors_addr = DEFINED (vectors_addr) ? vectors_addr : 0xffc0);
.vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 :
{
- *(.vectors)
+ KEEP (*(.vectors))
}"
#
@@ -111,20 +111,20 @@ esac
STARTUP_CODE="
/* Startup code. */
- *(.install0) /* Section should setup the stack pointer. */
- *(.install1) /* Place holder for applications. */
- *(.install2) /* Optional installation of data sections in RAM. */
- *(.install3) /* Place holder for applications. */
- *(.install4) /* Section that calls the main. */
+ KEEP (*(.install0)) /* Section should setup the stack pointer. */
+ KEEP (*(.install1)) /* Place holder for applications. */
+ KEEP (*(.install2)) /* Optional installation of data sections in RAM. */
+ KEEP (*(.install3)) /* Place holder for applications. */
+ KEEP (*(.install4)) /* Section that calls the main. */
"
FINISH_CODE="
/* Finish code. */
- *(.fini0) /* Beginning of finish code (_exit symbol). */
- *(.fini1) /* Place holder for applications. */
- *(.fini2) /* C++ destructors. */
- *(.fini3) /* Place holder for applications. */
- *(.fini4) /* Runtime exit. */
+ KEEP (*(.fini0)) /* Beginning of finish code (_exit symbol). */
+ KEEP (*(.fini1)) /* Place holder for applications. */
+ KEEP (*(.fini2)) /* C++ destructors. */
+ KEEP (*(.fini3)) /* Place holder for applications. */
+ KEEP (*(.fini4)) /* Runtime exit. */
"
PRE_COMPUTE_DATA_SIZE="
Index: scripttempl/elfm68hc12.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfm68hc12.sc,v
retrieving revision 1.9
diff -u -p -r1.9 elfm68hc12.sc
--- scripttempl/elfm68hc12.sc 30 Sep 2002 09:31:31 -0000 1.9
+++ scripttempl/elfm68hc12.sc 13 Oct 2002 09:28:13 -0000
@@ -75,7 +75,7 @@ VECTORS="
PROVIDE (_vectors_addr = DEFINED (vectors_addr) ? vectors_addr : 0xffc0);
.vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 :
{
- *(.vectors)
+ KEEP (*(.vectors))
}"
#
@@ -110,20 +110,20 @@ esac
STARTUP_CODE="
/* Startup code. */
- *(.install0) /* Section should setup the stack pointer. */
- *(.install1) /* Place holder for applications. */
- *(.install2) /* Optional installation of data sections in RAM. */
- *(.install3) /* Place holder for applications. */
- *(.install4) /* Section that calls the main. */
+ KEEP (*(.install0)) /* Section should setup the stack pointer. */
+ KEEP (*(.install1)) /* Place holder for applications. */
+ KEEP (*(.install2)) /* Optional installation of data sections in RAM. */
+ KEEP (*(.install3)) /* Place holder for applications. */
+ KEEP (*(.install4)) /* Section that calls the main. */
"
FINISH_CODE="
/* Finish code. */
- *(.fini0) /* Beginning of finish code (_exit symbol). */
- *(.fini1) /* Place holder for applications. */
- *(.fini2) /* C++ destructors. */
- *(.fini3) /* Place holder for applications. */
- *(.fini4) /* Runtime exit. */
+ KEEP (*(.fini0)) /* Beginning of finish code (_exit symbol). */
+ KEEP (*(.fini1)) /* Place holder for applications. */
+ KEEP (*(.fini2)) /* C++ destructors. */
+ KEEP (*(.fini3)) /* Place holder for applications. */
+ KEEP (*(.fini4)) /* Runtime exit. */
"
PRE_COMPUTE_DATA_SIZE="
reply other threads:[~2002-10-13 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DA95953.7080300@nerim.fr \
--to=stcarrez@nerim.fr \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).