[1/4] readelf: Rename parameter OFF to SIZE

Message ID 20191103075743.25467-2-ceggers@gmx.de
State New
Headers show
Series
  • readelf: Fixes for IN_RANGE
Related show

Commit Message

Christian Eggers Nov. 3, 2019, 7:57 a.m.
All users of IN_RANGE pass the relocation size (rather than the offset
which is passed in the ADDR parameter).

	* readelf.c (IN_RANGE): Rename parameter OFF to SIZE

Signed-off-by: Christian Eggers <ceggers@gmx.de>

---
 binutils/ChangeLog | 4 ++++
 binutils/readelf.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

--
2.16.4

Patch

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 36b75c1f3c..16ed7ed5b0 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@ 
+2019-11-03  Christian Eggers  <ceggers@gmx.de>
+
+	* readelf.c (IN_RANGE): Rename parameter OFF to SIZE.
+
 2019-10-20  Palmer Dabbelt  <palmer@sifive.com>

         * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 370bc4c1b7..8addb3443e 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12309,8 +12309,8 @@  process_syminfo (Filedata * filedata ATTRIBUTE_UNUSED)
   return TRUE;
 }

-#define IN_RANGE(START,END,ADDR,OFF)		\
-  (((ADDR) >= (START)) && ((ADDR) + (OFF) < (END)))
+#define IN_RANGE(START,END,ADDR,SIZE)		\
+  (((ADDR) >= (START)) && ((ADDR) + (SIZE) < (END)))

 /* Check to see if the given reloc needs to be handled in a target specific
    manner.  If so then process the reloc and return TRUE otherwise return