diff options
author | Brett Werling <bwerl.dev@gmail.com> | 2022-11-17 08:34:19 -0600 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-11-22 08:19:27 +1030 |
commit | d82e33deccc23f7198e20177f6164323201064eb (patch) | |
tree | 979b58357143f48ba3e5bc247dca3e3bbe82eeb9 /binutils/config.in | |
parent | 38c917d808fdb570ddb1215ccf8233a10484ba91 (diff) | |
download | binutils-d82e33deccc23f7198e20177f6164323201064eb.zip binutils-d82e33deccc23f7198e20177f6164323201064eb.tar.gz binutils-d82e33deccc23f7198e20177f6164323201064eb.tar.bz2 |
readelf: use fseeko64 or fseeko if possible
Changes readelf to make use first of fseeko64 and then fseeko,
depending on which of those is available. If neither is available,
reverts to the previous behavior of using fseek.
This is necessary when building readelf for LLP64 systems, where a
long will only be 32 bits wide. If the elf file in question is >= 2 GiB,
that is greater than the max long value and therefore fseek will fail
indicating that the offset is negative. On such systems, making use of
fseeko64 or fseeko will result in the ability so seek past the 2 GiB
max long boundary.
Note that large archive handling in readelf remains to be fixed.
Diffstat (limited to 'binutils/config.in')
-rw-r--r-- | binutils/config.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/binutils/config.in b/binutils/config.in index 4d22a80..91fe00a 100644 --- a/binutils/config.in +++ b/binutils/config.in @@ -67,6 +67,12 @@ /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H +/* Define to 1 if you have the `fseeko' function. */ +#undef HAVE_FSEEKO + +/* Define to 1 if you have the `fseeko64' function. */ +#undef HAVE_FSEEKO64 + /* Define to 1 if you have the `getc_unlocked' function. */ #undef HAVE_GETC_UNLOCKED |