[PATCH] D22116: [ELF] Support for setting the base address

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 13:09:50 PDT 2016


On Fri, Jul 8, 2016 at 12:01 PM, Rafael EspĂ­ndola <
llvm-commits at lists.llvm.org> wrote:

> On 8 July 2016 at 14:33, Petr Hosek via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > phosek added a comment.
> >
> > There are two issues here. The first is correctness, and you're right
> that for lld `-Trodata-segment` as an option for setting the start address
> would be better since lld puts rodata segment at the beginning. The other
> is compatibility, as large number of existing build scripts use
> `-Ttext-segment` as an option for setting the start address, irrespective
> of which linker is being used.
>
> I see, so what you base is an option to set the smallest used virtual
> address.
>
>
> > In our use case, we would like to have an option to set the start
> address in lld. Would it be fine with you if I rename the option to
> `-image-base`? This option is already supported by BFD ld, even though it's
> only used for PE targets, and OS X ld also has a similar option
> `-image_base`. Alternatively we could use a completely different name.
>
> Rui, is there something like that for COFF? image-base is a COFF term, no?
>
> Another option name would be -Tbase, or -Tfirst_segment since the
> other options are -Txyz.
>

On Windows, it is /base option.


> Taking a look a the patch itself.
>
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/b10505d8/attachment.html>


More information about the llvm-commits mailing list