aboutsummaryrefslogtreecommitdiff
path: root/pk/pk.ld
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2010-11-02 12:19:52 -0700
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2010-11-21 16:54:32 -0800
commit664411d5e692b487409dfb1c2ede9e214dd15602 (patch)
treef3ce1f0270fe0f8a93f2de52475c95fc681f10e8 /pk/pk.ld
parent9fe7d4f656dd3c6bfe6be17d2e48eacb59ad00f5 (diff)
downloadpk-664411d5e692b487409dfb1c2ede9e214dd15602.zip
pk-664411d5e692b487409dfb1c2ede9e214dd15602.tar.gz
pk-664411d5e692b487409dfb1c2ede9e214dd15602.tar.bz2
[opcodes, pk, sim, xcc] made jumps shorter and PC-relative
Diffstat (limited to 'pk/pk.ld')
-rw-r--r--pk/pk.ld62
1 files changed, 1 insertions, 61 deletions
diff --git a/pk/pk.ld b/pk/pk.ld
index 5dd3ce4..0ccf7ef 100644
--- a/pk/pk.ld
+++ b/pk/pk.ld
@@ -2,8 +2,7 @@ OUTPUT_ARCH( "mips:riscv" )
ENTRY( __start )
-GROUP( -lc -lgloss -lgcc )
-
+GROUP( -lc -lgcc -lgloss )
SECTIONS
{
@@ -31,18 +30,6 @@ SECTIONS
*(.gnu.linkonce.t.*)
}
- /* init: Code to execute before main (called by crt1.S) */
- .init :
- {
- KEEP( *(.init) )
- }
-
- /* fini: Code to execute after main (called by crt1.S) */
- .fini :
- {
- KEEP( *(.fini) )
- }
-
/* rodata: Read-only data */
.rodata :
{
@@ -57,53 +44,6 @@ SECTIONS
_etext = .;
/*--------------------------------------------------------------------*/
- /* Global constructor/destructor segement */
- /*--------------------------------------------------------------------*/
- /* The .ctors/.dtors sections are special sections which contain a
- list of constructor/destructor function pointers. crtbegin.o
- includes code in a .init section which goes through the .ctors list
- and calls each constuctor. crtend.o includes code in a .fini
- section which goes through the .dtors list and calls each
- destructor. crtbegin.o includes a special null pointer in its own
- .ctors/.dtors sections which acts as a start indicator for those
- lists. crtend.o also includes a special null pointer in its own
- .ctors/.dtors sections which acts as an end indictor. The linker
- commands below are setup so that crtbegin.o's .ctors/.dtors
- sections are always first and crtend.o's .ctors/.dtors sections are
- always last. This is the only way the list of functions will have
- the begin and end indicators in the right place. */
-
- /* ctors : Array of global constructor function pointers */
- .ctors :
- {
- KEEP( *crtbegin.o(.ctors) )
- KEEP( *(EXCLUDE_FILE(*crtend.o) .ctors) )
- KEEP( *(SORT(.ctors.*)) )
- KEEP( *(.ctors) )
- }
-
- /* dtors : Array of global destructor function pointers */
- .dtors :
- {
- KEEP( *crtbegin.o(.dtors) )
- KEEP( *(EXCLUDE_FILE(*crtend.o) .dtors) )
- KEEP( *(SORT(.dtors.*)) )
- KEEP( *(.dtors) )
- }
-
- /*--------------------------------------------------------------------*/
- /* Other misc gcc segments (this was in idt32.ld) */
- /*--------------------------------------------------------------------*/
- /* I am not quite sure about these sections but it seems they are for
- C++ exception handling. I think .jcr is for "Java Class
- Registration" but it seems to end up in C++ binaries as well. */
-
- .eh_frame_hdr : { *(.eh_frame_hdr) }
- .eh_frame : { KEEP( *(.eh_frame) ) }
- .gcc_except_table : { *(.gcc_except_table) }
- .jcr : { KEEP (*(.jcr)) }
-
- /*--------------------------------------------------------------------*/
/* Initialized data segment */
/*--------------------------------------------------------------------*/