mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-08 11:36:21 -04:00
ARM: fix linker file for newer ld support
older ld emitted all ELF relocations in input sections named .rel.dyn, whereas newer ld uses names of the form .rel*. The linker script only collected .rel.dyn input sections. Rewrite to collect all .rel* input sections. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
This commit is contained in:
parent
227b725155
commit
aaeb0a890a
@ -104,22 +104,6 @@ _bss_start_ofs:
|
|||||||
_bss_end_ofs:
|
_bss_end_ofs:
|
||||||
.word _end - _start
|
.word _end - _start
|
||||||
|
|
||||||
.globl _datarel_start_ofs
|
|
||||||
_datarel_start_ofs:
|
|
||||||
.word __datarel_start - _start
|
|
||||||
|
|
||||||
.globl _datarelrolocal_start_ofs
|
|
||||||
_datarelrolocal_start_ofs:
|
|
||||||
.word __datarelrolocal_start - _start
|
|
||||||
|
|
||||||
.globl _datarellocal_start_ofs
|
|
||||||
_datarellocal_start_ofs:
|
|
||||||
.word __datarellocal_start - _start
|
|
||||||
|
|
||||||
.globl _datarelro_start_ofs
|
|
||||||
_datarelro_start_ofs:
|
|
||||||
.word __datarelro_start - _start
|
|
||||||
|
|
||||||
#ifdef CONFIG_USE_IRQ
|
#ifdef CONFIG_USE_IRQ
|
||||||
/* IRQ stack memory (calculated at run-time) */
|
/* IRQ stack memory (calculated at run-time) */
|
||||||
.globl IRQ_STACK_START
|
.globl IRQ_STACK_START
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
@ -49,23 +50,9 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : {
|
.data : {
|
||||||
*(.data)
|
*(.data)
|
||||||
__datarel_start = .;
|
|
||||||
*(.data.rel)
|
|
||||||
__datarelrolocal_start = .;
|
|
||||||
*(.data.rel.ro.local)
|
|
||||||
__datarellocal_start = .;
|
|
||||||
*(.data.rel.local)
|
|
||||||
__datarelro_start = .;
|
|
||||||
*(.data.rel.ro)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__rel_dyn_start = .;
|
|
||||||
.rel.dyn : { *(.rel.dyn) }
|
|
||||||
__rel_dyn_end = .;
|
|
||||||
|
|
||||||
__dynsym_start = .;
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
|
|
||||||
. = .;
|
. = .;
|
||||||
__u_boot_cmd_start = .;
|
__u_boot_cmd_start = .;
|
||||||
@ -73,9 +60,24 @@ SECTIONS
|
|||||||
__u_boot_cmd_end = .;
|
__u_boot_cmd_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_start = .;
|
|
||||||
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
|
.rel.dyn : {
|
||||||
_end = .;
|
__rel_dyn_start = .;
|
||||||
|
*(.rel*)
|
||||||
|
__rel_dyn_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynsym : {
|
||||||
|
__dynsym_start = .;
|
||||||
|
*(.dynsym)
|
||||||
|
}
|
||||||
|
|
||||||
|
.bss __rel_dyn_start (OVERLAY) : {
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
/DISCARD/ : { *(.dynstr*) }
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
/DISCARD/ : { *(.dynamic*) }
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
@ -41,33 +41,32 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : {
|
.data : {
|
||||||
*(.data)
|
*(.data)
|
||||||
__datarel_start = .;
|
|
||||||
*(.data.rel)
|
|
||||||
__datarelrolocal_start = .;
|
|
||||||
*(.data.rel.ro.local)
|
|
||||||
__datarellocal_start = .;
|
|
||||||
*(.data.rel.local)
|
|
||||||
__datarelro_start = .;
|
|
||||||
*(.data.rel.ro)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__rel_dyn_start = .;
|
|
||||||
.rel.dyn : { *(.rel.dyn) }
|
|
||||||
__rel_dyn_end = .;
|
|
||||||
|
|
||||||
__dynsym_start = .;
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
|
|
||||||
. = .;
|
. = .;
|
||||||
__u_boot_cmd_start = .;
|
__u_boot_cmd_start = .;
|
||||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||||
__u_boot_cmd_end = .;
|
__u_boot_cmd_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_start = .;
|
|
||||||
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
|
.rel.dyn : {
|
||||||
_end = .;
|
__rel_dyn_start = .;
|
||||||
|
*(.rel*)
|
||||||
|
__rel_dyn_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynsym : {
|
||||||
|
__dynsym_start = .;
|
||||||
|
*(.dynsym)
|
||||||
|
}
|
||||||
|
|
||||||
|
.bss __rel_dyn_start (OVERLAY) : {
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
/DISCARD/ : { *(.dynstr*) }
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
/DISCARD/ : { *(.dynamic*) }
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
@ -45,24 +45,30 @@ SECTIONS
|
|||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
__rel_dyn_start = .;
|
|
||||||
.rel.dyn : { *(.rel.dyn) }
|
|
||||||
__rel_dyn_end = .;
|
|
||||||
|
|
||||||
__dynsym_start = .;
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
|
|
||||||
. = .;
|
. = .;
|
||||||
__u_boot_cmd_start = .;
|
__u_boot_cmd_start = .;
|
||||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||||
__u_boot_cmd_end = .;
|
__u_boot_cmd_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_start = .;
|
|
||||||
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
|
.rel.dyn : {
|
||||||
_end = .;
|
__rel_dyn_start = .;
|
||||||
|
*(.rel*)
|
||||||
|
__rel_dyn_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynsym : {
|
||||||
|
__dynsym_start = .;
|
||||||
|
*(.dynsym)
|
||||||
|
}
|
||||||
|
|
||||||
|
.bss __rel_dyn_start (OVERLAY) : {
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
/DISCARD/ : { *(.dynstr*) }
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
/DISCARD/ : { *(.dynamic*) }
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
@ -98,30 +98,6 @@ FIQ_STACK_START:
|
|||||||
IRQ_STACK_START_IN:
|
IRQ_STACK_START_IN:
|
||||||
.word 0x0badc0de
|
.word 0x0badc0de
|
||||||
|
|
||||||
.globl _datarel_start_ofs
|
|
||||||
_datarel_start_ofs:
|
|
||||||
.word __datarel_start - _start
|
|
||||||
|
|
||||||
.globl _datarelrolocal_start_ofs
|
|
||||||
_datarelrolocal_start_ofs:
|
|
||||||
.word __datarelrolocal_start - _start
|
|
||||||
|
|
||||||
.globl _datarellocal_start_ofs
|
|
||||||
_datarellocal_start_ofs:
|
|
||||||
.word __datarellocal_start - _start
|
|
||||||
|
|
||||||
.globl _datarelro_start_ofs
|
|
||||||
_datarelro_start_ofs:
|
|
||||||
.word __datarelro_start - _start
|
|
||||||
|
|
||||||
.globl _got_start_ofs
|
|
||||||
_got_start_ofs:
|
|
||||||
.word __got_start - _start
|
|
||||||
|
|
||||||
.globl _got_end_Ofs
|
|
||||||
_got_end_ofs:
|
|
||||||
.word __got_end - _start
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* the actual reset code
|
* the actual reset code
|
||||||
*/
|
*/
|
||||||
|
@ -44,34 +44,38 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : {
|
.data : {
|
||||||
*(.data)
|
*(.data)
|
||||||
__datarel_start = .;
|
|
||||||
*(.data.rel)
|
|
||||||
__datarelrolocal_start = .;
|
|
||||||
*(.data.rel.ro.local)
|
|
||||||
__datarellocal_start = .;
|
|
||||||
*(.data.rel.local)
|
|
||||||
__datarelro_start = .;
|
|
||||||
*(.data.rel.ro)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__rel_dyn_start = .;
|
|
||||||
.rel.dyn : { *(.rel.dyn) }
|
|
||||||
__rel_dyn_end = .;
|
|
||||||
|
|
||||||
__dynsym_start = .;
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
|
|
||||||
__got_start = .;
|
|
||||||
. = ALIGN(4);
|
|
||||||
.got : { *(.got) }
|
|
||||||
__got_end = .;
|
|
||||||
|
|
||||||
|
. = .;
|
||||||
__u_boot_cmd_start = .;
|
__u_boot_cmd_start = .;
|
||||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||||
__u_boot_cmd_end = .;
|
__u_boot_cmd_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_start = .;
|
|
||||||
.bss : { *(.bss) }
|
.rel.dyn : {
|
||||||
_end = .;
|
__rel_dyn_start = .;
|
||||||
|
*(.rel*)
|
||||||
|
__rel_dyn_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynsym : {
|
||||||
|
__dynsym_start = .;
|
||||||
|
*(.dynsym)
|
||||||
|
}
|
||||||
|
|
||||||
|
.bss __rel_dyn_start (OVERLAY) : {
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
/DISCARD/ : { *(.plt*) }
|
||||||
|
/DISCARD/ : { *(.interp*) }
|
||||||
|
/DISCARD/ : { *(.gnu*) }
|
||||||
}
|
}
|
||||||
|
@ -43,14 +43,6 @@ SECTIONS
|
|||||||
*(.data)
|
*(.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__rel_dyn_start = .;
|
|
||||||
.rel.dyn : { *(.rel.dyn) }
|
|
||||||
__rel_dyn_end = .;
|
|
||||||
|
|
||||||
__dynsym_start = .;
|
|
||||||
.dynsym : { *(.dynsym) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
. = .;
|
. = .;
|
||||||
@ -59,7 +51,28 @@ SECTIONS
|
|||||||
__u_boot_cmd_end = .;
|
__u_boot_cmd_end = .;
|
||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_start = .;
|
|
||||||
.bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
|
.rel.dyn : {
|
||||||
_end = .;
|
__rel_dyn_start = .;
|
||||||
|
*(.rel*)
|
||||||
|
__rel_dyn_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynsym : {
|
||||||
|
__dynsym_start = .;
|
||||||
|
*(.dynsym)
|
||||||
|
}
|
||||||
|
|
||||||
|
.bss __rel_dyn_start (OVERLAY) : {
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
/DISCARD/ : { *(.plt*) }
|
||||||
|
/DISCARD/ : { *(.interp*) }
|
||||||
|
/DISCARD/ : { *(.gnu*) }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user