mirror of
https://github.com/drasko/codezero.git
synced 2026-03-04 03:23:16 +01:00
Changes since April
Clean up of build directories. Simplifications to capability model.
This commit is contained in:
@@ -11,38 +11,60 @@ __stack = (virtual_base - 0x1000 - 8); /* First page before the env/args */
|
||||
|
||||
offset = virtual_base - physical_base;
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
rx PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = virtual_base;
|
||||
|
||||
/* Put all RX, RO sections here */
|
||||
_start_text = .;
|
||||
.text : AT (ADDR(.text) - offset) {
|
||||
.text : AT (ADDR(.text) - offset)
|
||||
{
|
||||
*(.text.head)
|
||||
*(.text)
|
||||
}
|
||||
.rodata : AT (ADDR(.rodata) - offset) {
|
||||
} : rx = 0x90909090
|
||||
|
||||
.rodata : AT (ADDR(.rodata) - offset)
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset) {
|
||||
} : rx = 0x90909090
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset)
|
||||
{
|
||||
*(.rodata1)
|
||||
}
|
||||
} : rx = 0x90909090
|
||||
|
||||
. = ALIGN(4K);
|
||||
.data : AT (ADDR(.data) - offset) {
|
||||
|
||||
/* Put all RW sections here */
|
||||
.data : AT (ADDR(.data) - offset)
|
||||
{
|
||||
_start_test_exec = .;
|
||||
*(.testexec)
|
||||
_end_test_exec = .;
|
||||
*(.data)
|
||||
}
|
||||
.got : AT (ADDR(.got) - offset) {
|
||||
} : rw
|
||||
|
||||
.got : AT (ADDR(.got) - offset)
|
||||
{
|
||||
*(.got)
|
||||
}
|
||||
.got.plt : AT (ADDR(.got.plt) - offset) {
|
||||
} : rw
|
||||
|
||||
.got.plt : AT (ADDR(.got.plt) - offset)
|
||||
{
|
||||
*(.got.plt)
|
||||
}
|
||||
.bss : AT (ADDR(.bss) - offset) {
|
||||
} : rw
|
||||
|
||||
.bss : AT (ADDR(.bss) - offset)
|
||||
{
|
||||
*(.bss)
|
||||
}
|
||||
} : rw
|
||||
_end = .;
|
||||
}
|
||||
|
||||
@@ -8,18 +8,29 @@ virtual_base = %s;
|
||||
|
||||
/* First page before the env/args */
|
||||
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
rx PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = virtual_base;
|
||||
.text : { *(.text.head) *(.text) }
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
|
||||
/* RX, RO sections */
|
||||
.text : { *(.text.head) *(.text) } : rx =0x90909090
|
||||
.rodata : { *(.rodata) } : rx =0x90909090
|
||||
.rodata1 : { *(.rodata1) } : rx =0x90909090
|
||||
|
||||
. = ALIGN(4K);
|
||||
.data : { *(.data) }
|
||||
.got : { *(.got) }
|
||||
.got.plt : { *(.got.plt) }
|
||||
.bss : { *(.bss) }
|
||||
|
||||
/* RW sections */
|
||||
.data : { *(.data) } : rw
|
||||
.got : { *(.got) } : rw
|
||||
.got.plt : { *(.got.plt) } :rw
|
||||
.bss : { *(.bss) } : rw
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user