From e1279d1d6b5f9205c6603cc661ce7af64e09b5e8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 16 Jun 2014 22:21:16 +0930 Subject: [PATCH] Fix duplicated assignments to __rel_iplt and __rela_iplt symbols and fix more nds32 dependencies. * scripttempl/elf.sc: Edit out __rela_iplt symbol assignments from .rel sections, and __rel_iplt from .rela sections. * scripttempl/nds32elf.sc: Likewise. * Makefile.am (ends32*.c): Depend on nds32elf.sc. * Makefile.in: Regenerate. --- ld/ChangeLog | 8 ++++++++ ld/Makefile.am | 12 ++++++------ ld/Makefile.in | 12 ++++++------ ld/scripttempl/elf.sc | 8 ++++---- ld/scripttempl/nds32elf.sc | 8 ++++---- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 783c4bd..ef8234e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2014-06-16 Alan Modra + + * scripttempl/elf.sc: Edit out __rela_iplt symbol assignments from + .rel sections, and __rel_iplt from .rela sections. + * scripttempl/nds32elf.sc: Likewise. + * Makefile.am (ends32*.c) Depend on nds32elf.sc. + * Makefile.in: Regenerate. + 2014-06-13 Alan Modra PR 17047 diff --git a/ld/Makefile.am b/ld/Makefile.am index 66795b3..a22006c 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -1490,27 +1490,27 @@ emsp430X.c: $(srcdir)/emulparams/msp430.sh $(srcdir)/emulparams/msp430X.sh \ ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32elf16m.c: $(srcdir)/emulparams/nds32elf16m.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf.c: $(srcdir)/emulparams/nds32belf.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf16m.c: $(srcdir)/emulparams/nds32belf16m.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32elf_linux.c: $(srcdir)/emulparams/nds32elf_linux.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf_linux.c: $(srcdir)/emulparams/nds32belf_linux.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} enews.c: $(srcdir)/emulparams/news.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 6a534ca..1c43066 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -2928,27 +2928,27 @@ emsp430X.c: $(srcdir)/emulparams/msp430.sh $(srcdir)/emulparams/msp430X.sh \ ends32elf.c: $(srcdir)/emulparams/nds32elf.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32elf16m.c: $(srcdir)/emulparams/nds32elf16m.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf.c: $(srcdir)/emulparams/nds32belf.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf16m.c: $(srcdir)/emulparams/nds32belf16m.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32elf_linux.c: $(srcdir)/emulparams/nds32elf_linux.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} ends32belf_linux.c: $(srcdir)/emulparams/nds32belf_linux.sh \ $(ELF_DEPS) $(srcdir)/emultempl/nds32elf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/scripttempl/nds32elf.sc ${GEN_DEPENDS} enews.c: $(srcdir)/emulparams/news.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index e8126cb..6d0d13d 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -410,13 +410,13 @@ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;/__rela_iplt_/d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;/__rel_iplt_/d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <