sparc: do not leave a hole between .text and .data
The a.out format does not allow to handle this properly. So we need the two sections to be contiguous. Change-Id: I44455d4fb728bd47d5dcebc48c52b7d90d808104 Reviewed-on: https://review.haiku-os.org/c/1469 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -5,21 +5,26 @@ ENTRY(_start)
|
|||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
/* Execution address. The file is loaded at 0x4000 with its header,
|
||||||
|
* then relocated here. */
|
||||||
. = 0x202000;
|
. = 0x202000;
|
||||||
|
|
||||||
__text_begin = .;
|
__text_begin = .;
|
||||||
|
|
||||||
|
/* keep text and data sections next to each other, as the loader in openboot
|
||||||
|
* is not able to handle a hole between them.
|
||||||
|
*/
|
||||||
|
|
||||||
/* text/read-only data */
|
/* text/read-only data */
|
||||||
.text : { *(.text.start) /* Make sure entry point is at start of file */
|
.text : {
|
||||||
|
/* Make sure entry point is at start of file. Not required, since
|
||||||
|
* it is set using ENTRY above, but it looks nicer and makes it
|
||||||
|
* clearer we jumped at the correct address. */
|
||||||
|
*(.text.start)
|
||||||
|
|
||||||
*(.text .text.* .gnu.linkonce.t.*)
|
*(.text .text.* .gnu.linkonce.t.*)
|
||||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||||
*(.sdata2) }
|
*(.sdata2) }
|
||||||
|
|
||||||
/* writable data */
|
|
||||||
/* align to the same offset in the next page (for performance reasons
|
|
||||||
(not that it really matters in the boot loader)) */
|
|
||||||
. = ALIGN(0x1000) + 0x1000 + (. & (0x1000 - 1));
|
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
__ctor_list = .;
|
__ctor_list = .;
|
||||||
*(.ctors)
|
*(.ctors)
|
||||||
|
|||||||
Reference in New Issue
Block a user