[PATCH] D59095: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol relocations
    Fangrui Song via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar  8 02:08:05 PST 2019
    
    
  
MaskRay accepted this revision.
MaskRay added inline comments.
================
Comment at: tools/llvm-readobj/ELFDumper.cpp:2735
+        Addend = " - ";
+        RelAddend = std::abs(RelAddend);
+      } else
----------------
jhenderson wrote:
> MaskRay wrote:
> > If `r_addend = LLONG_MIN`, `abs(r_addend)` is ub...
> > 
> > "The behavior is undefined if the result cannot be represented by the return type."
> Yes, it is. But it's already a problem, so I'd like to fix this separately, if that's okay?
That's totally fine :)
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59095/new/
https://reviews.llvm.org/D59095
    
    
More information about the llvm-commits
mailing list