From: daniel.schwierzeck at gmail.com Date: Sat, 9 Feb 2013 21:33:29 +0100 Subject: [U-Boot] [PATCH v1 6/7] MIPS: u-boot.lds: add relocation specific sections In-Reply-To: <1360442010-7520-1-git-send-email-daniel.schwierzeck@gmail.com> References: <1360442010-7520-1-git-send-email-daniel.schwierzeck@gmail.com> Message-ID: <1360442010-7520-7-git-send-email-daniel.schwierzeck@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Gabor Juhos This section contain the table needed for dynamic relocation. Also provide symbols for the relocation code to access the table. Discard all sections which are not needed in the final ELF binary and U-Boot image. Section .dynsym cannot be discarded or GNU ld crashes otherwise. This section will be stripped by GNU objcpy in a later patch. Signed-off-by: Gabor Juhos Signed-off-by: Daniel Schwierzeck --- arch/mips/cpu/u-boot.lds | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds index 4cd983a..cea9533 100644 --- a/arch/mips/cpu/u-boot.lds +++ b/arch/mips/cpu/u-boot.lds @@ -70,7 +70,17 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - .bss : { + .rel.dyn : { + __rel_dyn_start = .; + *(.rel.dyn) + __rel_dyn_end = .; + } + + .dynsym : { + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; *(.sbss.*) *(.bss.*) @@ -78,4 +88,16 @@ SECTIONS . = ALIGN(4); __bss_end = .; } + + /DISCARD/ : { + *(.dynbss) + *(.dynstr) + *(.dynamic) + *(.interp) + *(.hash) + *(.gnu.*) + *(.plt) + *(.got.plt) + *(.rel.plt) + } } -- 1.8.1.1