* [PATCH] x86/build: also handle .comment.* in linker script
@ 2022-03-21 11:47 Jan Beulich
2022-03-21 12:00 ` Roger Pau Monné
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2022-03-21 11:47 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Wei Liu, Roger Pau Monné
Oldish SUSE compilers generate .comment.SUSE.OPTS sections. Just like we
already discard such for xen.efi, fold them into .comment for xen-syms.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Just like for .comment itself I also wouldn't mind discarding these also
for the non-EFI case.
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -454,7 +454,7 @@ SECTIONS
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .comment 0 : { *(.comment) *(.comment.*) }
/*
* LLVM ld also wants .symtab, .strtab, and .shstrtab placed. These look to
* be benign to GNU ld, so we can have them here unconditionally.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/build: also handle .comment.* in linker script
2022-03-21 11:47 [PATCH] x86/build: also handle .comment.* in linker script Jan Beulich
@ 2022-03-21 12:00 ` Roger Pau Monné
0 siblings, 0 replies; 2+ messages in thread
From: Roger Pau Monné @ 2022-03-21 12:00 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel@lists.xenproject.org, Andrew Cooper, Wei Liu
On Mon, Mar 21, 2022 at 12:47:27PM +0100, Jan Beulich wrote:
> Oldish SUSE compilers generate .comment.SUSE.OPTS sections. Just like we
> already discard such for xen.efi, fold them into .comment for xen-syms.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Just like for .comment itself I also wouldn't mind discarding these also
> for the non-EFI case.
I guess there's a reason for compilers to add additional comments, and
we shouldn't discard those randomly?
In any case they won't be loaded, so I don't see much issue with
having them on the binary image.
Thanks, Roger.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-21 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-21 11:47 [PATCH] x86/build: also handle .comment.* in linker script Jan Beulich
2022-03-21 12:00 ` Roger Pau Monné
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.