*.efi.lds: Merge all rela sections into one

Objcopy sometimes generates .rela.plt and .rela.data
sections for which their names are longer than the 8
characters limit of PE32

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
This commit is contained in:
Callum Farmer 2023-02-21 11:57:17 +00:00
parent 593e13937c
commit eea6d31a22
7 changed files with 41 additions and 26 deletions

View File

@ -55,10 +55,14 @@ SECTIONS
_bss_end = .; _bss_end = .;
} }
.rela.dyn : { *(.rela.dyn) } .rela :
.rela.plt : { *(.rela.plt) } {
.rela.got : { *(.rela.got) } *(.rela.text*)
.rela.data : { *(.rela.data) *(.rela.data*) } *(.rela.data*)
*(.rela.got)
*(.rela.plt)
*(.rela.stab)
}
. = ALIGN(512); . = ALIGN(512);
_edata = .; _edata = .;
_data_size = . - _data; _data_size = . - _data;

View File

@ -41,10 +41,14 @@ SECTIONS
_bss_end = .; _bss_end = .;
} }
.rel.dyn : { *(.rel.dyn) } .rel :
.rel.plt : { *(.rel.plt) } {
.rel.got : { *(.rel.got) } *(.rel.text*)
.rel.data : { *(.rel.data) *(.rel.data*) } *(.rel.data*)
*(.rel.got)
*(.rel.plt)
*(.rel.stab)
}
_edata = .; _edata = .;
_data_size = . - _etext; _data_size = . - _etext;

View File

@ -55,9 +55,11 @@ SECTIONS
. = ALIGN(4096); . = ALIGN(4096);
.rel : .rel :
{ {
*(.rel.data) *(.rel.text*)
*(.rel.data.*) *(.rel.sdata*)
*(.rel.data*)
*(.rel.got) *(.rel.got)
*(.rel.plt)
*(.rel.stab) *(.rel.stab)
*(.data.rel.ro.local) *(.data.rel.ro.local)
*(.data.rel.local) *(.data.rel.local)

View File

@ -52,10 +52,11 @@ SECTIONS
. = ALIGN(4096); . = ALIGN(4096);
.rela : .rela :
{ {
*(.rela.text) *(.rela.text*)
*(.rela.sdata*)
*(.rela.data*) *(.rela.data*)
*(.rela.sdata)
*(.rela.got) *(.rela.got)
*(.rela.plt)
*(.rela.gnu.linkonce.d*) *(.rela.gnu.linkonce.d*)
*(.rela.stab) *(.rela.stab)
*(.rela.ctors) *(.rela.ctors)

View File

@ -41,10 +41,14 @@ SECTIONS
_bss_end = .; _bss_end = .;
} }
.rel.dyn : { *(.rel.dyn) } .rel :
.rel.plt : { *(.rel.plt) } {
.rel.got : { *(.rel.got) } *(.rel.text*)
.rel.data : { *(.rel.data) *(.rel.data*) } *(.rel.data*)
*(.rel.got)
*(.rel.plt)
*(.rel.stab)
}
_edata = .; _edata = .;
_data_size = . - _etext; _data_size = . - _etext;

View File

@ -44,16 +44,14 @@ SECTIONS {
_bss_end = .; _bss_end = .;
} }
.rela.text : .rela :
{ *(.rela.text) *(.rela.text*) } {
.rela.dyn : *(.rela.text*)
{ *(.rela.dyn) } *(.rela.data*)
.rela.plt : *(.rela.got)
{ *(.rela.plt) } *(.rela.plt)
.rela.got : *(.rela.stab)
{ *(.rela.got) } }
.rela.data :
{ *(.rela.data) *(.rela.data*) }
. = ALIGN(512); . = ALIGN(512);
_edata = .; _edata = .;
_data_size = . - _data; _data_size = . - _data;

View File

@ -57,8 +57,10 @@ SECTIONS
. = ALIGN(4096); . = ALIGN(4096);
.rela : .rela :
{ {
*(.rela.text*)
*(.rela.data*) *(.rela.data*)
*(.rela.got) *(.rela.got)
*(.rela.plt)
*(.rela.stab) *(.rela.stab)
} }
. = ALIGN(4096); . = ALIGN(4096);