Message ID | 20230112154548.163021-2-frankja@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390x: Snippet fixes | expand |
On Thu, 12 Jan 2023 15:45:42 +0000 Janosch Frank <frankja@linux.ibm.com> wrote: > It seems like the loader file was copied over from another > architecture which has a different page size (64K) than s390 (4K). > > Let's use a 4k alignment instead of the 64k one and remove unneeded > entries. > > Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > --- > s390x/flat.lds | 19 ++++--------------- > 1 file changed, 4 insertions(+), 15 deletions(-) > > diff --git a/s390x/flat.lds b/s390x/flat.lds > index de9da1a8..952f6cd4 100644 > --- a/s390x/flat.lds > +++ b/s390x/flat.lds > @@ -24,20 +24,8 @@ SECTIONS > *(.text) > *(.text.*) > } > - . = ALIGN(64K); > + . = ALIGN(4K); > etext = .; > - .opd : { *(.opd) } > - . = ALIGN(16); > - .dynamic : { > - dynamic_start = .; > - *(.dynamic) > - } > - .dynsym : { > - dynsym_start = .; > - *(.dynsym) > - } > - .rela.dyn : { *(.rela*) } > - . = ALIGN(16); > .data : { > *(.data) > *(.data.rel*) > @@ -48,10 +36,11 @@ SECTIONS > __bss_start = .; > .bss : { *(.bss) } > __bss_end = .; > - . = ALIGN(64K); > + . = ALIGN(4K); > edata = .; > + /* Reserve 64K for the stack */ > . += 64K; > - . = ALIGN(64K); > + . = ALIGN(4K); > /* > * stackptr set with initial stack frame preallocated > */
diff --git a/s390x/flat.lds b/s390x/flat.lds index de9da1a8..952f6cd4 100644 --- a/s390x/flat.lds +++ b/s390x/flat.lds @@ -24,20 +24,8 @@ SECTIONS *(.text) *(.text.*) } - . = ALIGN(64K); + . = ALIGN(4K); etext = .; - .opd : { *(.opd) } - . = ALIGN(16); - .dynamic : { - dynamic_start = .; - *(.dynamic) - } - .dynsym : { - dynsym_start = .; - *(.dynsym) - } - .rela.dyn : { *(.rela*) } - . = ALIGN(16); .data : { *(.data) *(.data.rel*) @@ -48,10 +36,11 @@ SECTIONS __bss_start = .; .bss : { *(.bss) } __bss_end = .; - . = ALIGN(64K); + . = ALIGN(4K); edata = .; + /* Reserve 64K for the stack */ . += 64K; - . = ALIGN(64K); + . = ALIGN(4K); /* * stackptr set with initial stack frame preallocated */
It seems like the loader file was copied over from another architecture which has a different page size (64K) than s390 (4K). Let's use a 4k alignment instead of the 64k one and remove unneeded entries. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> --- s390x/flat.lds | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)