aboutsummaryrefslogtreecommitdiff
path: root/bbl/bbl.lds
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-03-09 23:58:17 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-03-09 23:58:17 -0800
commitb94c7a4b07f96f24ae7411780abf874416549f7b (patch)
treeb94ca015e49392f52e5abf1209ee184fcf874db4 /bbl/bbl.lds
parentf5a96732cb81571a3ba6b081b8556187d564f678 (diff)
downloadriscv-pk-b94c7a4b07f96f24ae7411780abf874416549f7b.zip
riscv-pk-b94c7a4b07f96f24ae7411780abf874416549f7b.tar.gz
riscv-pk-b94c7a4b07f96f24ae7411780abf874416549f7b.tar.bz2
Refactor pk, bbl, machine into separate libraries
Yuck.
Diffstat (limited to 'bbl/bbl.lds')
-rw-r--r--bbl/bbl.lds100
1 files changed, 100 insertions, 0 deletions
diff --git a/bbl/bbl.lds b/bbl/bbl.lds
new file mode 100644
index 0000000..5ccdf22
--- /dev/null
+++ b/bbl/bbl.lds
@@ -0,0 +1,100 @@
+OUTPUT_ARCH( "riscv" )
+
+ENTRY( reset_vector )
+
+SECTIONS
+{
+
+ /*--------------------------------------------------------------------*/
+ /* Code and read-only segment */
+ /*--------------------------------------------------------------------*/
+
+ /* Begining of code and text segment */
+ . = 0;
+ _ftext = .;
+ PROVIDE( eprol = . );
+
+ .text :
+ {
+ *(.text.init)
+ }
+
+ /* text: Program code section */
+ .text :
+ {
+ *(.text)
+ *(.text.*)
+ *(.gnu.linkonce.t.*)
+ }
+
+ /* rodata: Read-only data */
+ .rodata :
+ {
+ *(.rdata)
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ }
+
+ /* End of code and read-only segment */
+ PROVIDE( etext = . );
+ _etext = .;
+
+ /*--------------------------------------------------------------------*/
+ /* Initialized data segment */
+ /*--------------------------------------------------------------------*/
+
+ /* Start of initialized data segment */
+ . = ALIGN(16);
+ _fdata = .;
+
+ /* data: Writable data */
+ .data :
+ {
+ *(.data)
+ *(.data.*)
+ *(.srodata*)
+ *(.gnu.linkonce.d.*)
+ *(.comment)
+ }
+
+ /* End of initialized data segment */
+ . = ALIGN(4);
+ PROVIDE( edata = . );
+ _edata = .;
+
+ /*--------------------------------------------------------------------*/
+ /* Uninitialized data segment */
+ /*--------------------------------------------------------------------*/
+
+ /* Start of uninitialized data segment */
+ . = .;
+ _fbss = .;
+
+ /* sbss: Uninitialized writeable small data section */
+ . = .;
+
+ /* bss: Uninitialized writeable data section */
+ . = .;
+ _bss_start = .;
+ .bss :
+ {
+ *(.bss)
+ *(.bss.*)
+ *(.sbss*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ }
+
+ .sbi :
+ {
+ *(.sbi)
+ }
+
+ .payload :
+ {
+ *(.payload)
+ }
+
+ _end = .;
+}