[PATCH] D14991: [ELF/AArch64] Print a diagnostic message if nonzero addend is used in a GOT relocation.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 14:00:06 PST 2015


----- Original Message -----
> From: "Rui Ueyama via llvm-commits" <llvm-commits at lists.llvm.org>
> To: reviews+D14991+public+daab73e9b0e4fc6a at reviews.llvm.org
> Cc: "llvm-commits" <llvm-commits at lists.llvm.org>, "Davide Italiano" <dccitaliano at gmail.com>
> Sent: Wednesday, November 25, 2015 2:10:34 PM
> Subject: Re: [PATCH] D14991: [ELF/AArch64] Print a diagnostic message if nonzero addend is used in a GOT relocation.
> 
> They are examples in which we create invalid outputs for broken
> inputs. My point still stands. It is not always unacceptable to
> create invalid outputs in such case.

Now I'm confused. It seems like Igor is saying that the error is for completely valid inputs that we otherwise just don't handle correctly. Analogous to the fact that we error on completely valid relocations that we just don't happen to have implemented. This is preferable to silently doing something that miscompiles (mislinks?) the result.

 -Hal

> 
> 
> On Wed, Nov 25, 2015 at 11:38 AM, Igor Kudrin < ikudrin.dev at gmail.com
> > wrote:
> 
> 
> ikudrin added a comment.
> 
> Your first example violates the expected format of archive, if I
> understand it right. We may rely on underlying library and its
> checks in that case.
> 
> I have no comment for the second example. May be it's hard to imagine
> other command or something.
> 
> But in this case, I just wanted to detect our own ABI violation. Not
> to implement that case, as it might be rare, just detect. And I
> wanted to be honest with our users and not generate broken result
> from an ABI-compliant input if it can be avoided.
> 
> 
> http://reviews.llvm.org/D14991
> 
> 
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-commits mailing list