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:
Albert ARIBAUD 2014-02-22 17:53:42 +01:00
parent 62bbc2f25a
commit d0b5d9da5d
22 changed files with 117 additions and 29 deletions

View file

@ -33,7 +33,11 @@ SECTIONS
.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
}
.bss :
{

View file

@ -50,5 +50,8 @@ SECTIONS
.bss : { *(.bss*) }
__bss_end = .;
_end = .;
.end :
{
*(.__end)
}
}

View file

@ -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*) }

View file

@ -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*) }

View file

@ -38,7 +38,11 @@ SECTIONS
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
} >.sram
.bss :
{

View file

@ -39,7 +39,11 @@ SECTIONS
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
}
.bss :
{

View file

@ -28,7 +28,11 @@ SECTIONS
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
}
.bss : {
. = ALIGN(4);

View file

@ -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

View file

@ -37,7 +37,11 @@ SECTIONS
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
} >.sram
.bss :
{

View file

@ -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*) }

View file

@ -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*) }

View file

@ -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

View file

@ -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")));

View file

@ -49,5 +49,9 @@ SECTIONS
} >.sram
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
} >.sram
}

View file

@ -48,5 +48,9 @@ SECTIONS
} >.sram
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
}
}

View file

@ -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) }

View file

@ -49,5 +49,9 @@ SECTIONS
} >.sram
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
}
}

View file

@ -61,5 +61,8 @@ SECTIONS
__bss_end = .;
}
_end = .;
.end :
{
*(.__end)
}
}

View file

@ -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*) }

View file

@ -42,7 +42,11 @@ SECTIONS
. = ALIGN(4);
__image_copy_end = .;
_end = .;
.end :
{
*(.__end)
} >.sram
.bss :
{

View file

@ -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*) }

View file

@ -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*) }