From: "H.J. Lu" <hjl.tools@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-arch@vger.kernel.org, Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Kees Cook <keescook@chromium.org>, Borislav Petkov <bp@suse.de>,
"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 1/2] powerpc: Keep .rela* sections when CONFIG_RELOCATABLE is defined
Date: Tue, 28 Apr 2020 06:21:04 -0700 [thread overview]
Message-ID: <20200428132105.170886-1-hjl.tools@gmail.com> (raw)
Message-ID: <20200428132104.4VuJGdckI7-ndeD2qQ4ijqEHaOjRgVfIi1WpiEwNqSE@z> (raw)
arch/powerpc/kernel/vmlinux.lds.S has
#ifdef CONFIG_RELOCATABLE
...
.rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET)
{
__rela_dyn_start = .;
*(.rela*)
}
#endif
...
DISCARDS
/DISCARD/ : {
*(*.EMB.apuinfo)
*(.glink .iplt .plt .rela* .comment)
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
}
Since .rela* sections are needed when CONFIG_RELOCATABLE is defined,
don't discard .rela* sections if CONFIG_RELOCATABLE is defined.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
---
arch/powerpc/kernel/vmlinux.lds.S | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 31a0f201fb6f..4ba07734a210 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -366,9 +366,12 @@ SECTIONS
DISCARDS
/DISCARD/ : {
*(*.EMB.apuinfo)
- *(.glink .iplt .plt .rela* .comment)
+ *(.glink .iplt .plt .comment)
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
+#ifndef CONFIG_RELOCATABLE
+ *(.rela*)
+#endif
}
}
--
2.25.4
next reply other threads:[~2020-04-28 13:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 13:21 H.J. Lu [this message]
2020-04-28 13:21 ` [PATCH 1/2] powerpc: Keep .rela* sections when CONFIG_RELOCATABLE is defined H.J. Lu
2020-04-28 13:21 ` [PATCH 2/2] Discard .note.gnu.property sections in generic NOTES H.J. Lu
2020-04-28 13:21 ` H.J. Lu
2022-09-16 19:40 ` Omar Sandoval
2022-09-17 6:31 ` Christophe Leroy
2022-09-19 17:26 ` Omar Sandoval
2022-09-19 17:33 ` Mark Brown
2022-09-19 17:40 ` Omar Sandoval
2022-09-19 17:54 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428132105.170886-1-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bp@suse.de \
--cc=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=yu-cheng.yu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).