This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Incremental merge for ppc-vx6
- From: Alan Modra <amodra at gmail dot com>
- To: Douglas B Rupp <rupp at adacore dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 23 Oct 2018 11:45:35 +1030
- Subject: Re: [PATCH] Incremental merge for ppc-vx6
- References: <8ed4e4f2-5979-c89d-7e86-d279521326c1@adacore.com>
On Mon, Oct 22, 2018 at 12:09:38PM -0700, Douglas B Rupp wrote:
>
> This patch implements merging of sections created by -ffunction-sections and
> -fdata-sections on ppc-vx6.
Which means you are breaking ld --gc-sections if you use ld -r in any
intermediate step on the way to link a final executable. It's bad
enough that ld -r merges sections of like names, let alone merging
.text.* into .text.
> If the sections are not merged, gdb malfunctions when printing the address
> of a runtime symbol.
Presumably you are talking about a gdb problem only when trying to
debug kernel modules or similar objects that haven't undergone a final
link. If address are a problem, have you considered modifying ld -r
to instead not set section VMAs to zero? That would mean removing all
${RELOCATING-0} from elf.sc and modifying lang_insert_orphan to not
use "address = exp_intop (0)" for ld -r. If that cures the vxworks
gdb problem, I'd much rather remove a hack from GNU ld for Solaris
than add a new hack for vxworks.
> The problem can be fixed in gdb (but not easily) for the WTX protocol used
> for older vxworks targets but not for newer vxworks (e.g. vxworks7) because
> the protocol is different and not under gdb control.
I find it hard to believe a host/target communication protocol has any
bearing on this problem.
--
Alan Modra
Australia Development Lab, IBM