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
Binary filesize exceeded UINT32_MAX(0xffffffff) bytes, add-needed rewrite fails all entries Steps To Reproduce
Our codebase's compilation target demo_service is quite large, and after the compilation is completed, we inject TensorFlow's custom operator library through patchelf, which takes effect when the program starts; one day, we suddenly noticed that patchelf failed, and the biggest difference we found was that the binary file size had increased significantly, exactly exceeding the limit of UINT32_MAX.
4273231224 < UINT32_MAX (4294967295) < 4312607552
works fine
now. 4312607552B
2024/07/29 15:55:20 bin/demo_service 4312607552B
patching ELF file 'demo_service'
DT_NULL index is 75
replacing section '.dynamic' with size 1312
replacing section '.dynstr' with size 53578732
this is an executable
using replaced section '.dynstr'
using replaced section '.dynamic'
last replaced is 28
looking at section '.interp'
replacing section '.interp' which is in the way
looking at section '.note.ABI-tag'
replacing section '.note.ABI-tag' which is in the way
looking at section '.note.gnu.build-id'
replacing section '.note.gnu.build-id' which is in the way
looking at section '.dynsym'
replacing section '.dynsym' which is in the way
looking at section '.dynstr'
looking at section '.gnu.hash'
first reserved offset/addr is 0x3a3d560/0x3e3d560
first page is 0x400000
needed space is 61070032
needed space is 61070088
needed pages is 2
changing alignment of program header 2 from 32768 to 4096
clearing first 61076096 bytes
rewriting section '.interp' from offset 0x270 (size 28) to offset 0x2e0 (size 28)
rewriting section '.note.ABI-tag' from offset 0x28c (size 32) to offset 0x300 (size 32)
rewriting section '.note.gnu.build-id' from offset 0x2ac (size 36) to offset 0x320 (size 36)
rewriting section '.dynsym' from offset 0x2d0 (size 7489200) to offset 0x348 (size 7489200)
rewriting section '.dynstr' from offset 0x724980 (size 53578714) to offset 0x7249f8 (size 53578732)
rewriting section '.dynamic' from offset 0x13bc31a8 (size 1296) to offset 0x3a3d5e8 (size 1312)
rewriting symbol table section 4
rewriting symbol table section 48
warning: entry 29229 bound 51 in symbol table refers to a non-existent section, skipping
warning: entry 24387 bound 51 in symbol table refers to a non-existent section, skipping
warning: entry 28524 bound 51 in symbol table refers to a non-existent section, skipping
warning: entry 24320 bound 51 in symbol table refers to a non-existent section, skipping
...
warning: entry 29806 bound 51 in symbol table refers to a non-existent section, skipping
writing viking.back
Expected behavior
A clear and concise description of what you expected to happen.
patchelf --version output
patchelf 0.12
The text was updated successfully, but these errors were encountered:
Describe the bug
Binary filesize exceeded UINT32_MAX(0xffffffff) bytes,
add-needed
rewrite fails all entriesSteps To Reproduce
Our codebase's compilation target
demo_service
is quite large, and after the compilation is completed, we inject TensorFlow's custom operator library through patchelf, which takes effect when the program starts; one day, we suddenly noticed that patchelf failed, and the biggest difference we found was that the binary file size had increased significantly, exactly exceeding the limit of UINT32_MAX.4273231224 < UINT32_MAX (4294967295) < 4312607552
works fine
Expected behavior
A clear and concise description of what you expected to happen.
patchelf --version
outputThe text was updated successfully, but these errors were encountered: