This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: -Tbss on ELF harmful?
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: -Tbss on ELF harmful?
- From: Ian Lance Taylor <ian at airs dot com>
- Date: 29 Oct 2001 18:47:52 -0800
- Cc: binutils at sources dot redhat dot com
- References: <200110300146.f9U1kn010611@greed.delorie.com>
DJ Delorie <dj@redhat.com> writes:
> One of our customers has pointed out that -Tbss doesn't work with ELF
> because the __bss_start symbol is not actually inside the .bss
> section, and thus won't get moved with it. However, __bss_start also
> encompasses .sbss, so we can't just move the symbol inside .bss to fix
> it. I can think of a couple of hacks to try to detect cases where it
> breaks/works, but they're really hacks and still not 100% reliable. I
> hate to remove or deprecate it, because for some formats (like the
> a.out it was designed for) it's an appropriate option.
>
> What to do? Ideas? Opinions?
None of -Ttext, -Tdata, or -Tbss work for ELF. They do the wrong
thing, since they affect sections rather than segments. Don't use
them.
For ELF you have to use a linker script. Or we could design different
options which did the right thing, somehow.
Ian