From 8622092d584962801e4248cd4bb4bef6e71827b0 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 5 Sep 2014 14:40:23 -0400 Subject: [BZ #17354] tile: Fix up corner cases with signed relocations Some types of relocations technically need to be signed rather than unsigned: in particular ones that are used with moveli or movei, or for jump and branch. This is almost never a problem. Jump and branch opcodes are pretty much uniformly resolved by the static linker (unless you omit -fpic for a shared library, which is not recommended). The moveli and movei opcodes that need to be sign-extended generally are for positive displacements, like the construction of the address of main() from _start(). However, tst-pie1 ends up with main below _start (in a different module) and the test failed due to signedness issues in relocation handling. This commit treats the value as signed when shifting (to preserve the high bit) and also sign-extends the value generated from the updated bundle when comparing with the desired bundle, which we do to make sure no overflow occurred. As a result, the tst-pie1 test now passes. --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 498e493659..393d03cb9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-09-06 Chris Metcalf + + [BZ #17354] + * sysdeps/tile/dl-machine.h (elf_machine_rela): Add a MUNGE_SIGNED + macro for handling signed relocations. + 2014-09-03 Florian Weimer [BZ #17325] -- cgit v1.2.3-70-g09d2