This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR gold/17640


> LEA gives you the value after the program has bee loaded
> to memory at run-time.  But in ld.so before it has bootstrapped itself
>
> movl _DYNAMIC@GOT(%ecx), %eax
>
> gives you the link-time address, which what ld.so wants to bootstrap
> itself.

So are you saying that, when linking ld.so, you don't want to convert
that particular mov to an lea? If that's what you're saying, then this
patch isn't going to accomplish that. Remember back when I asked why
you were special-casing the name in Scan::global, but not in
Relocate::relocate? You said that you wanted to keep the GOT entry,
but didn't need to check when doing the conversion. As it stands,
you'll generate the GOT entry in Scan::global, but you'll still
convert the mov to an lea in Relocate::relocate, so the converted code
won't actually use the GOT entry, and you'll get the run-time address.

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]