forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
committed by
Alan Modra
parent
38c917d808
commit
d82e33decc
2
binutils/configure
vendored
2
binutils/configure
vendored
@@ -13155,7 +13155,7 @@ $as_echo "#define HAVE_MMAP 1" >>confdefs.h
|
||||
fi
|
||||
rm -f conftest.mmap conftest.txt
|
||||
|
||||
for ac_func in getc_unlocked mkdtemp mkstemp utimensat utimes
|
||||
for ac_func in getc_unlocked mkdtemp mkstemp utimensat utimes fseeko fseeko64
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
|
||||
Reference in New Issue
Block a user