From: Nick Clifton Date: Tue, 25 Jun 2024 11:41:20 +0000 (+0100) Subject: Revert 4ee1d7e401a8c1aedfdc86aac7faa8267eab1e5c X-Git-Tag: binutils-2_43~285 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c438c8d083f84eb59eb465020e5b7a923afe1ba;p=thirdparty%2Fbinutils-gdb.git Revert 4ee1d7e401a8c1aedfdc86aac7faa8267eab1e5c PR 20880 --- diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 95eef84f607..31bdb0b95ad 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