mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
arm: make _end compiler-generated
This prevents references to _end from generating absolute relocation records. This change is binary invariant for ARM targets. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
This commit is contained in:
parent
62bbc2f25a
commit
d0b5d9da5d
22 changed files with 117 additions and 29 deletions
|
@ -33,7 +33,11 @@ SECTIONS
|
|||
.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -50,5 +50,8 @@ SECTIONS
|
|||
.bss : { *(.bss*) }
|
||||
__bss_end = .;
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,9 +49,14 @@ SECTIONS
|
|||
__bss_end = .;
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
_image_binary_end = .;
|
||||
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -49,9 +49,14 @@ SECTIONS
|
|||
__bss_end = .;
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
_image_binary_end = .;
|
||||
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -38,7 +38,11 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
} >.sram
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -39,7 +39,11 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -28,7 +28,11 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
.bss : {
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -60,7 +60,12 @@ SECTIONS
|
|||
*(.__rel_dyn_end)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
/*
|
||||
* Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
|
||||
|
|
|
@ -37,7 +37,11 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
} >.sram
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -42,7 +42,12 @@ SECTIONS
|
|||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
|
@ -51,7 +56,7 @@ SECTIONS
|
|||
__bss_end = .;
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -60,7 +60,12 @@ SECTIONS
|
|||
*(.__rel_dyn_end)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
/*
|
||||
* Deprecated: this MMU section is used by pxa at present but
|
||||
|
@ -91,7 +96,7 @@ SECTIONS
|
|||
KEEP(*(.__bss_end));
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -32,7 +32,6 @@ endif
|
|||
ifndef CONFIG_SYS_GENERIC_BOARD
|
||||
obj-y += board.o
|
||||
endif
|
||||
obj-y += sections.o
|
||||
|
||||
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
|
||||
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
||||
|
@ -43,6 +42,7 @@ else
|
|||
obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
|
||||
endif
|
||||
|
||||
obj-y += sections.o
|
||||
ifdef CONFIG_ARM64
|
||||
obj-y += interrupts_64.o
|
||||
else
|
||||
|
|
|
@ -25,3 +25,4 @@ char __image_copy_start[0] __attribute__((section(".__image_copy_start")));
|
|||
char __image_copy_end[0] __attribute__((section(".__image_copy_end")));
|
||||
char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start")));
|
||||
char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end")));
|
||||
char _end[0] __attribute__((section(".__end")));
|
||||
|
|
|
@ -49,5 +49,9 @@ SECTIONS
|
|||
} >.sram
|
||||
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
} >.sram
|
||||
}
|
||||
|
|
|
@ -48,5 +48,9 @@ SECTIONS
|
|||
} >.sram
|
||||
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,12 @@ SECTIONS
|
|||
*(.__rel_dyn_end)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
/*
|
||||
* Deprecated: this MMU section is used by pxa at present but
|
||||
|
@ -92,7 +97,7 @@ SECTIONS
|
|||
KEEP(*(.__bss_end));
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.hash : { *(.hash) }
|
||||
.got.plt : { *(.got.plt) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
|
|
|
@ -49,5 +49,9 @@ SECTIONS
|
|||
} >.sram
|
||||
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,5 +61,8 @@ SECTIONS
|
|||
__bss_end = .;
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,12 @@ SECTIONS
|
|||
*(.__rel_dyn_end)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
/*
|
||||
* Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
|
||||
|
@ -90,7 +95,7 @@ SECTIONS
|
|||
KEEP(*(.__bss_end));
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -42,7 +42,11 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
} >.sram
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -77,7 +77,12 @@ SECTIONS
|
|||
*(.__rel_dyn_end)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
/*
|
||||
* Deprecated: this MMU section is used by pxa at present but
|
||||
|
@ -108,7 +113,7 @@ SECTIONS
|
|||
KEEP(*(.__bss_end));
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
|
@ -54,7 +54,12 @@ SECTIONS
|
|||
|
||||
. = ALIGN(0x800);
|
||||
|
||||
_end = .;
|
||||
.end :
|
||||
{
|
||||
*(.__end)
|
||||
}
|
||||
|
||||
_image_binary_end = .;
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
|
@ -63,7 +68,7 @@ SECTIONS
|
|||
__bss_end = .;
|
||||
}
|
||||
|
||||
.dynsym _end : { *(.dynsym) }
|
||||
.dynsym _image_binary_end : { *(.dynsym) }
|
||||
.dynbss : { *(.dynbss) }
|
||||
.dynstr : { *(.dynstr*) }
|
||||
.dynamic : { *(.dynamic*) }
|
||||
|
|
Loading…
Reference in a new issue