You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing the 14.0 pre-release I noticed an issue with a binary file, which gets damaged by strip:
xbbmi:~ ilg$ cd tmp
xbbmi:tmp ilg$ cp /Users/ilg/Work/xpack-dev-tools/gcc-xpack.git/build/darwin-x64/x86_64-apple-darwin18.7.0/build/gcc-14.0.1//x86_64-apple-darwin18.7.0/libsanitizer/asan/libasan_preinit.o .
xbbmi:tmp ilg$ otool -L libasan_preinit.o
libasan_preinit.o:
xbbmi:tmp ilg$ strip -S libasan_preinit.o
xbbmi:tmp ilg$ otool -L libasan_preinit.o
/Library/Developer/CommandLineTools/usr/bin/objdump: 'libasan_preinit.o': truncated or malformed object (string table at offset 0 with a size of 8, overlaps Mach-O headers at offset 0 with a size of 160)
xbbmi:tmp ilg$
This is not a hypothetical case, the strip operation is performed during make install-strip, and otool is invoked in my builds during the post-processing step.
I don't know how bad the damage is; the linker accepted the file as an input, but the test was superficial, not functional.
In my scripts the workaround was to ignore the otool exit code, given that this file does not require any post-processing. Another possible workaround is to use the newer llvm-strip, which is available from the clang install.
My guess is that some new records are used in the file and this confuses the old strip, but I have no evidence on this. Perhaps these new records can be written differently and avoid the issue.
It would be good to know what happens, and if it is benign or not.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While testing the 14.0 pre-release I noticed an issue with a binary file, which gets damaged by strip:
This is not a hypothetical case, the strip operation is performed during
make install-strip
, andotool
is invoked in my builds during the post-processing step.I don't know how bad the damage is; the linker accepted the file as an input, but the test was superficial, not functional.
In my scripts the workaround was to ignore the
otool
exit code, given that this file does not require any post-processing. Another possible workaround is to use the newerllvm-strip
, which is available from the clang install.My guess is that some new records are used in the file and this confuses the old strip, but I have no evidence on this. Perhaps these new records can be written differently and avoid the issue.
It would be good to know what happens, and if it is benign or not.
Beta Was this translation helpful? Give feedback.
All reactions