diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:44:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:44:12 +0000 |
commit | c53addf38e24e4dafe992aafb3ae928bfa8fdb0a (patch) | |
tree | 5a8f08e745d2dbfdd66c9e4838a8b7eeb7f0453f /ELF/Relocations.cpp | |
parent | 2dcc0c5ee66570f02392d1fbf29f573fa47258f8 (diff) |
Notes
Diffstat (limited to 'ELF/Relocations.cpp')
-rw-r--r-- | ELF/Relocations.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ELF/Relocations.cpp b/ELF/Relocations.cpp index c505a14f3c649..5564ea246eeb9 100644 --- a/ELF/Relocations.cpp +++ b/ELF/Relocations.cpp @@ -935,6 +935,10 @@ static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) { bool IsConstant = isStaticLinkTimeConstant<ELFT>(Expr, Type, Body, Sec, Rel.r_offset); + // The size is not going to change, so we fold it in here. + if (Expr == R_SIZE) + Addend += Body.getSize<ELFT>(); + // If the output being produced is position independent, the final value // is still not known. In that case we still need some help from the // dynamic linker. We can however do better than just copying the incoming |