aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-06-25 12:41:20 +0100
committerNick Clifton <nickc@redhat.com>2024-06-25 12:41:20 +0100
commit8c438c8d083f84eb59eb465020e5b7a923afe1ba (patch)
tree8eb46aa47c09d3f2e72a07fc47714f28e1e8d336 /ld
parent5ac806f22edad7f31098915f0545909e1f0ce6ff (diff)
downloadbinutils-8c438c8d083f84eb59eb465020e5b7a923afe1ba.zip
binutils-8c438c8d083f84eb59eb465020e5b7a923afe1ba.tar.gz
binutils-8c438c8d083f84eb59eb465020e5b7a923afe1ba.tar.bz2
Revert 4ee1d7e401a8c1aedfdc86aac7faa8267eab1e5c
PR 20880
Diffstat (limited to 'ld')
-rw-r--r--ld/pe-dll.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 95eef84..31bdb0b 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -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