]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove support for old v1 & v2 style GNU build notes.
authorNick Clifton <nickc@redhat.com>
Wed, 24 Feb 2021 10:08:56 +0000 (10:08 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 24 Feb 2021 10:08:56 +0000 (10:08 +0000)
* objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
build notes.
* readelf.c (print_gnu_build_attribute_description): Likewise.

binutils/ChangeLog
binutils/objcopy.c
binutils/readelf.c

index 42b6954911f5e8bf23d1b55f0382c5a5da2377a8..60c60d04857ec637c7da291c383e6f2dfdd9651c 100644 (file)
@@ -1,3 +1,9 @@
+2021-02-24  Nick Clifton  <nickc@redhat.com>
+
+       * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
+       build notes.
+       * readelf.c (print_gnu_build_attribute_description): Likewise.
+
 2021-02-24  Alan Modra  <amodra@gmail.com>
            Siddhesh Poyarekar  <siddhesh@gotplt.org>
 
index 90ae0bd46bd0ff421fdbaa55c35fa92d5e8783c7..041aceaeefe89defdde746ddb86f97bf1ef3b365 100644 (file)
@@ -2246,23 +2246,8 @@ merge_gnu_build_notes (bfd *          abfd,
          break;
 
        case 8:
-         if (! is_64bit (abfd))
-           {
-             start = bfd_get_32 (abfd, pnote->note.descdata);
-             end = bfd_get_32 (abfd, pnote->note.descdata + 4);
-           }
-         else
-           {
-             start = bfd_get_64 (abfd, pnote->note.descdata);
-             /* FIXME: For version 1 and 2 notes we should try to
-                calculate the end address by finding a symbol whose
-                value is START, and then adding in its size.
-
-                For now though, since v1 and v2 was not intended to
-                handle gaps, we chose an artificially large end
-                address.  */
-             end = (bfd_vma) -1;
-           }
+         start = bfd_get_32 (abfd, pnote->note.descdata);
+         end = bfd_get_32 (abfd, pnote->note.descdata + 4);
          break;
 
        case 16:
index 9510a8d1addbdaad34b1be65fa90abeed7d9d793..811c529986a4623223ba88d686d799ce13c9cde9 100644 (file)
@@ -19907,17 +19907,8 @@ print_gnu_build_attribute_description (Elf_Internal_Note *  pnote,
       break;
 
     case 8:
-      if (is_32bit_elf)
-       {
-         /* FIXME: We should check that version 3+ notes are being used here...  */
-         start = byte_get ((unsigned char *) pnote->descdata, 4);
-         end = byte_get ((unsigned char *) pnote->descdata + 4, 4);
-       }
-      else
-       {
-         start = byte_get ((unsigned char *) pnote->descdata, 8);
-         end = 0;
-       }
+      start = byte_get ((unsigned char *) pnote->descdata, 4);
+      end = byte_get ((unsigned char *) pnote->descdata + 4, 4);
       break;
 
     case 16: