src/
authorRoland McGrath <roland@redhat.com>
Fri, 29 Feb 2008 10:17:16 +0000 (10:17 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 29 Feb 2008 10:17:16 +0000 (10:17 +0000)
2008-02-29  Roland McGrath  <roland@redhat.com>

* readelf.c (print_attributes): Add a cast.
* elflint.c (check_attributes): Likewise.

* unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
(add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.

NEWS
src/ChangeLog
src/elflint.c
src/readelf.c
src/unaligned.h

diff --git a/NEWS b/NEWS
index 8016316..2ffc19a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+Version 0.133:
+
+readelf, elflint, libebl: SHT_GNU_ATTRIBUTE section handling (readelf -A)
+
+readelf: core note handling for NT_386_TLS, NT_PPC_SPE, Alpha NT_AUXV
+
+libdwfl: bug fixes and optimization in relocation handling
+
+elfcmp: bug fix for non-allocated section handling
+
 Version 0.132:
 
 libcpu: Implement x86 and x86-64 disassembler.
index 71b82b1..0bba5ca 100644 (file)
@@ -1,3 +1,12 @@
+2008-02-29  Roland McGrath  <roland@redhat.com>
+
+       * readelf.c (print_attributes): Add a cast.
+       * elflint.c (check_attributes): Likewise.
+
+       * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
+       with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
+       (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
+
 2008-02-03  Ulrich Drepper  <drepper@redhat.com>
 
        * i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
index 9a1a717..54aa111 100644 (file)
@@ -3213,7 +3213,7 @@ section [%2d] '%s': offset %zu: zero length field in attribute subsection\n"),
            if (MY_ELFDATA != ehdr->e_ident[EI_DATA])
              CONVERT (subsection_len);
 
-           if (p - chunk < subsection_len)
+           if (p - chunk < (ptrdiff_t) subsection_len)
              {
                ERROR (gettext ("\
 section [%2d] '%s': offset %zu: invalid length in attribute subsection\n"),
index 0f0773c..96b5d43 100644 (file)
@@ -2866,7 +2866,7 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
                if (MY_ELFDATA != ehdr->e_ident[EI_DATA])
                  CONVERT (subsection_len);
 
-               if (unlikely (p - sub < subsection_len))
+               if (unlikely (p - sub < (ptrdiff_t) subsection_len))
                  break;
 
                const unsigned char *r = q + sizeof subsection_len;
index bf1e529..ad7c55a 100644 (file)
@@ -1,5 +1,5 @@
 /* Unaligned memory access functionality.
-   Copyright (C) 2000, 2001, 2002, 2003 Red Hat, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2008 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2001.
 
@@ -89,19 +89,19 @@ union u_8ubyte_unaligned
 #else
 # define add_2ubyte_unaligned(ptr, value) \
   do {                                                                       \
-    union u_2ubyte_unaligned *_ptr = (ptr);                                  \
+    union u_2ubyte_unaligned *_ptr = (void *) (ptr);                         \
     uint16_t _val = bswap_16 (_ptr->u) + (value);                            \
     _ptr->u = bswap_16 (_val);                                               \
   } while (0)
 # define add_4ubyte_unaligned(ptr, value) \
   do {                                                                       \
-    union u_4ubyte_unaligned *_ptr = (ptr);                                  \
+    union u_4ubyte_unaligned *_ptr = (void *) (ptr);                         \
     uint32_t _val = bswap_32 (_ptr->u) + (value);                            \
     _ptr->u = bswap_32 (_val);                                               \
   } while (0)
 # define add_8ubyte_unaligned(ptr, value) \
   do {                                                                       \
-    union u_8ubyte_unaligned *_ptr = (ptr);                                  \
+    union u_8ubyte_unaligned *_ptr = (void *) (ptr);                         \
     uint64_t _val = bswap_64 (_ptr->u) + (value);                            \
     _ptr->u = bswap_64 (_val);                                               \
   } while (0)