[PATCH] D32173: [ELF] - Assign absolute values in linkerscript correctly #1.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 03:43:40 PDT 2017
grimar added a comment.
In https://reviews.llvm.org/D32173#736295, @ruiu wrote:
> Sorry for the delay. I was on vacation last week.
>
> So, this patch allows you compute absolute symbols addresses lazily. With that, you can create cycles like this.
>
> foo = ABSOLUTE(bar - 0xff);
> bar = ABSOLUTE(foo - 0xff);
>
>
> What do you think it should be handled?
>
> Also, you can create not a cycle but a series of expressions that should be calculated backwards, like this.
>
> foo = ABSOLUTE(bar);
> bar = ABSOLUTE(baz);
> baz = 0xff;
>
>
> What do you think about this?
Honestly I think I like idea to calculate something absolute for symbol which section did not
get VA assigned yet at all. And I dont like idea to evaluate something lazily too.
I just don't sure how to handle such situations properly, thats why prepared 2 different patches
with approaches I can imagine.
May be we just should produce an error in such cases ? That will be inconsistent behavior
with GNU linkers, but simplifies things.
https://reviews.llvm.org/D32173
More information about the llvm-commits
mailing list