Skip to content

Commit

Permalink
Revert "riscv: Reposition .rodata to after .bss"
Browse files Browse the repository at this point in the history
This reverts commit 8de8c9f.

Signed-off-by: Kent McLeod <[email protected]>
  • Loading branch information
kent-mcleod committed Feb 4, 2022
1 parent 8916143 commit d8a36b3
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions elfloader-tool/src/arch-riscv/linker.lds
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
* SPDX-License-Identifier: GPL-2.0-only
*/

/*
* NOTE: For RISC-V 32-bit, having the .rodata section before the .data section causes the elfloader to
* freeze up. Thus, for 32-bit we move the .rodata section to after the .bss section as previously
* before some refactoring. The 64-bit version does not seem to be affect by this issue and uses thus
* uses the new layout.
*/

#include <autoconf.h>
#include <elfloader/gen_config.h>
#include "image_start_addr.h"
Expand All @@ -29,7 +22,6 @@ SECTIONS
{
*(.text)
}
#ifdef CONFIG_ARCH_RISCV64
. = ALIGN(16);
.rodata :
{
Expand All @@ -45,7 +37,6 @@ SECTIONS
*(._archive_cpio)
_archive_end = .;
}
#endif
. = ALIGN(16);
.data :
{
Expand All @@ -63,22 +54,5 @@ SECTIONS
*(.bss.*)
_bss_end = .;
}
#ifdef CONFIG_ARCH_RISCV32
. = ALIGN(16);
.rodata :
{
*(.srodata*)
. = ALIGN(16);
*(.rodata)
*(.rodata.*)
/*
* ld crashes when we add this here: *(_driver_list)
*/
. = ALIGN(16);
_archive_start = .;
*(._archive_cpio)
_archive_end = .;
}
#endif
_end = .;
}

0 comments on commit d8a36b3

Please sign in to comment.