]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Revert 4ee1d7e401a8c1aedfdc86aac7faa8267eab1e5c
authorNick Clifton <nickc@redhat.com>
Tue, 25 Jun 2024 11:41:20 +0000 (12:41 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 25 Jun 2024 11:41:20 +0000 (12:41 +0100)
  PR 20880

ld/pe-dll.c

index 95eef84f607681fb1f534bccb4939accbbc0cd37..31bdb0b95ad1c33bda7d4aee0f75fb55ce569486 100644 (file)
@@ -2534,8 +2534,6 @@ make_one (def_file_export *exp, bfd *parent, bool include_jmp_stub)
     }
   else
     {
-      int ord;
-
       /* { short, asciz }  */
       if (exp->its_name)
        len = 2 + strlen (exp->its_name) + 1;
@@ -2547,13 +2545,8 @@ make_one (def_file_export *exp, bfd *parent, bool include_jmp_stub)
       d6 = xmalloc (len);
       id6->contents = d6;
       memset (d6, 0, len);
-
-      /* PR 20880:  Use exp->hint as a backup, just in case exp->ordinal
-        contains an invalid value (-1).  */
-      ord = (exp->ordinal >= 0) ? exp->ordinal : exp->hint;
-      d6[0] = ord;
-      d6[1] = ord >> 8;
-
+      d6[0] = exp->hint & 0xff;
+      d6[1] = exp->hint >> 8;
       if (exp->its_name)
        strcpy ((char*) d6 + 2, exp->its_name);
       else