Skip to content

Commit

Permalink
Linker Script samples.
Browse files Browse the repository at this point in the history
vmlinux.lds by Martin Mares; license GPL v2.
link.ld by Anthony Zbierajewski; license GPL v2.
ld.script by Wu Zhangjink; license GPL v2.
  • Loading branch information
larsbrinkhoff committed Apr 21, 2015
1 parent 164caa2 commit d7207f3
Show file tree
Hide file tree
Showing 3 changed files with 435 additions and 0 deletions.
50 changes: 50 additions & 0 deletions samples/Linker Script/filenames/ld.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* ld.script for compressed kernel support of MIPS
*
* Copyright (C) 2009 Lemote Inc.
* Author: Wu Zhangjin <[email protected]>
* Copyright (C) 2010 "Wu Zhangjin" <[email protected]>
*/

OUTPUT_ARCH(mips)
ENTRY(start)
SECTIONS
{
/* Text and read-only data */
/* . = VMLINUZ_LOAD_ADDRESS; */
.text : {
*(.text)
*(.rodata)
}
/* End of text section */

/* Writable data */
.data : {
*(.data)
/* Put the compressed image here */
__image_begin = .;
*(.image)
__image_end = .;
CONSTRUCTORS
}
. = ALIGN(16);
_edata = .;
/* End of data section */

/* BSS */
.bss : {
*(.bss)
}
. = ALIGN(16);
_end = .;

/* Sections to be discarded */
/DISCARD/ : {
*(.MIPS.options)
*(.options)
*(.pdr)
*(.reginfo)
*(.comment)
*(.note)
}
}
12 changes: 12 additions & 0 deletions samples/Linker Script/link.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* link.ld
*/
OUTPUT_FORMAT(elf32-i386)
ENTRY(start)
SECTIONS
{
. = 0x100000;
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
Loading

0 comments on commit d7207f3

Please sign in to comment.