From: Nicholas Piggin <npiggin@gmail.com>
To: Michal Marek <mmarek@suse.com>
Cc: Nicholas Piggin <npiggin@gmail.com>, linux-kbuild@vger.kernel.org
Subject: [PATCH 4/7] kbuild: improve linker compatibility with lib-ksyms.o build
Date: Thu, 24 Nov 2016 03:41:40 +1100 [thread overview]
Message-ID: <20161123164143.16839-5-npiggin@gmail.com> (raw)
In-Reply-To: <20161123164143.16839-1-npiggin@gmail.com>
lib-ksyms.o is created by linking an empty input file with a linker
script containing the interesting bits. Currently the empty input file
is an archive containing nothing, however this causes the gold linker
to segfault.
I have opened a bug against gold
https://sourceware.org/bugzilla/show_bug.cgi?id=20767
However this can be worked around by assembling an empty file to link
with instead. The resulting lib-ksyms.o is slightly larger (seemingly
due to empty .text, .data, .bss setions added), but final linked
output should not be changed.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
scripts/Makefile.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 41d2901..8925209 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -490,7 +490,7 @@ quiet_cmd_export_list = EXPORTS $@
cmd_export_list = $(OBJDUMP) -h $< | \
sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\
rm -f $(dummy-object);\
- $(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\
+ echo | $(CC) $(a_flags) -c -o $(dummy-object) -x assembler -;\
$(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\
rm $(dummy-object) $(ksyms-lds)
--
2.10.2
next prev parent reply other threads:[~2016-11-23 16:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 16:41 [PATCH 0/7] kbuild patches for 4.10 Nicholas Piggin
2016-11-23 16:41 ` [PATCH 1/7] kbuild: kallsyms allow 3-pass generation if symbols size has changed Nicholas Piggin
2016-11-23 16:41 ` [PATCH 2/7] kbuild: thin archives for multi-y targets Nicholas Piggin
2016-11-23 16:41 ` [PATCH 3/7] kbuild/genksyms: handle va_list type Nicholas Piggin
2016-11-23 16:41 ` Nicholas Piggin [this message]
2016-11-23 16:41 ` [PATCH 5/7] kbuild: keep data tables through dead code elimination Nicholas Piggin
2016-11-23 16:41 ` [PATCH 6/7] kbuild: modpost warn if export version crc is missing Nicholas Piggin
2016-11-23 16:41 ` [PATCH 7/7] kbuild: minor improvement for thin archives build Nicholas Piggin
2016-11-29 21:25 ` [PATCH 0/7] kbuild patches for 4.10 Michal Marek
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=20161123164143.16839-5-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.