Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bloaty: Unexpected eh_frame format value: 8 #141

Open
caiiiycuk opened this issue Aug 21, 2018 · 5 comments · May be fixed by #185
Open

bloaty: Unexpected eh_frame format value: 8 #141

caiiiycuk opened this issue Aug 21, 2018 · 5 comments · May be fixed by #185

Comments

@caiiiycuk
Copy link

caiiiycuk commented Aug 21, 2018

I tried build my binary with g++ and clang++, and analyze with bloaty. I always had same error

bloaty: Unexpected eh_frame format value: 8

I trying to analyze elf file (linux build), when I run bloaty without flags it prints correct output:

     VM SIZE                         FILE SIZE
 --------------                   --------------
   0.0%       0 .debug_info        63.3Mi  73.2%
   0.0%       0 .debug_str         5.82Mi   6.7%
   0.0%       0 .debug_loc         5.06Mi   5.8%
   0.0%       0 .debug_line        3.11Mi   3.6%
  65.1%  3.09Mi .text              3.09Mi   3.6%
   0.0%       0 .debug_abbrev      1.71Mi   2.0%
   0.0%       0 .debug_ranges      1.51Mi   1.7%
   0.0%       0 .strtab             887Ki   1.0%
  17.5%   848Ki .eh_frame           848Ki   1.0%
  13.7%   664Ki .rodata             664Ki   0.7%
   0.0%       0 .symtab             340Ki   0.4%
   1.8%  86.9Ki .eh_frame_hdr      86.9Ki   0.1%
   0.0%       0 .debug_aranges     77.0Ki   0.1%
   1.0%  50.6Ki .gcc_except_table  50.6Ki   0.1%
   0.5%  25.0Ki .bss                    0   0.0%
   0.1%  6.73Ki .dynstr            6.73Ki   0.0%
   0.1%  4.50Ki [22 Others]        4.98Ki   0.0%
   0.1%  3.80Ki .dynsym            3.80Ki   0.0%
   0.1%  3.17Ki .plt               3.17Ki   0.0%
   0.0%     340 [ELF Headers]      1.86Ki   0.0%
   0.0%  1.58Ki .rel.plt           1.58Ki   0.0%
 100.0%  4.75Mi TOTAL              86.6Mi 100.0%

But for compileuntis or symbols I had this error.

OS: Ubuntu 16.04
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)

I tried also -g and -ggdb3 flags, same problem

@haberman
Copy link
Member

haberman commented Mar 4, 2019

Sorry for the very slow reply. Are you still getting this error?

If you can give me a repro (like maybe post a binary somewhere) I'll debug and fix it.

@caiiiycuk
Copy link
Author

Hi, np. This one bin.zip

I can rebuild it with other flags, just tell me which to use.

alexkozy added a commit to alexkozy/bloaty that referenced this issue Apr 11, 2020
When I run bloaty against my binary I got "bloaty: Unexpected
eh_frame format value: 8" error.
According documentation libobjc2 I can interpret this value as
signed version of DW_EH_PE_abstr.
After further research I found that this library has strange handling
for such values [2] and it mentions something about GCC extension.

It looks like this value should be returned as is, at least when
current logic tries to translate it by calling TranslateVMToFile,
this calls fails.

When this value is returned as is it looks like I am getting quite
valid output for my binary.

It might fix google#141

[1] https://github.com/gnustep/libobjc2/blob/master/dwarf_eh.h#L23
[2] https://github.com/gnustep/libobjc2/blob/master/dwarf_eh.h#L200
@alexkozy alexkozy linked a pull request Apr 11, 2020 that will close this issue
@xorz57
Copy link

xorz57 commented Sep 27, 2024

Is anyone working on this issue?

@xorz57
Copy link

xorz57 commented Sep 27, 2024

Hi, np. This one bin.zip

I can rebuild it with other flags, just tell me which to use.

Is it possible to share the source code you used for this binary? Or at least what libraries you used?

@caiiiycuk
Copy link
Author

Hi, np. This one bin.zip
I can rebuild it with other flags, just tell me which to use.

Is it possible to share the source code you used for this binary? Or at least what libraries you used?

Unfrotunately I forgot the project that I used to compile binary. Accroding ldd:

ldd /mnt/c/Users/caiii/Downloads/bin
        linux-gate.so.1 (0xf7fa9000)
        libpng16.so.16 => /lib/i386-linux-gnu/libpng16.so.16 (0xf7f4e000)
        libbsd.so.0 => /lib/i386-linux-gnu/libbsd.so.0 (0xf7f36000)
        libGLESv2.so.2 => /lib/i386-linux-gnu/libGLESv2.so.2 (0xf7f27000)
        libSDL_mixer-1.2.so.0 => /lib/i386-linux-gnu/libSDL_mixer-1.2.so.0 (0xf7ed1000)
        libSDL-1.2.so.0 => /lib/i386-linux-gnu/libSDL-1.2.so.0 (0xf7e2d000)
        libglfw.so.3 => not found
        libstdc++.so.6 => /lib/i386-linux-gnu/libstdc++.so.6 (0xf7bf9000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7af1000)
        libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7aca000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7893000)
        libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7875000)
        libmd.so.0 => /lib/i386-linux-gnu/libmd.so.0 (0xf7867000)
        libGLdispatch.so.0 => /lib/i386-linux-gnu/libGLdispatch.so.0 (0xf77ea000)
        libmikmod.so.3 => /lib/i386-linux-gnu/libmikmod.so.3 (0xf779c000)
        libfluidsynth.so.3 => /lib/i386-linux-gnu/libfluidsynth.so.3 (0xf76b7000)
        libvorbisfile.so.3 => /lib/i386-linux-gnu/libvorbisfile.so.3 (0xf76ab000)
        libFLAC.so.8 => /lib/i386-linux-gnu/libFLAC.so.8 (0xf766f000)
        libmad.so.0 => /lib/i386-linux-gnu/libmad.so.0 (0xf7656000)
        libasound.so.2 => /lib/i386-linux-gnu/libasound.so.2 (0xf7532000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf752b000)
        libpulse-simple.so.0 => /lib/i386-linux-gnu/libpulse-simple.so.0 (0xf7525000)
        libpulse.so.0 => /lib/i386-linux-gnu/libpulse.so.0 (0xf74c5000)
        libX11.so.6 => /lib/i386-linux-gnu/libX11.so.6 (0xf7373000)
        libXext.so.6 => /lib/i386-linux-gnu/libXext.so.6 (0xf735c000)
        libcaca.so.0 => /lib/i386-linux-gnu/libcaca.so.0 (0xf7290000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf728b000)
        /lib/ld-linux.so.2 (0xf7fab000)
        libSDL2-2.0.so.0 => /lib/i386-linux-gnu/libSDL2-2.0.so.0 (0xf70d1000)
        libopenal.so.1 => /lib/i386-linux-gnu/libopenal.so.1 (0xf6fd8000)
        libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xf6e83000)
        libgmodule-2.0.so.0 => /lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xf6e7b000)
        libjack.so.0 => /lib/i386-linux-gnu/libjack.so.0 (0xf6e1f000)
        libsndfile.so.1 => /lib/i386-linux-gnu/libsndfile.so.1 (0xf6d84000)
        libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xf6d25000)
        libreadline.so.8 => /lib/i386-linux-gnu/libreadline.so.8 (0xf6cd5000)
        libgomp.so.1 => /lib/i386-linux-gnu/libgomp.so.1 (0xf6c87000)
        libinstpatch-1.0.so.2 => /lib/i386-linux-gnu/libinstpatch-1.0.so.2 (0xf6bb1000)
        libgobject-2.0.so.0 => /lib/i386-linux-gnu/libgobject-2.0.so.0 (0xf6b49000)
        libvorbis.so.0 => /lib/i386-linux-gnu/libvorbis.so.0 (0xf6b1d000)
        libogg.so.0 => /lib/i386-linux-gnu/libogg.so.0 (0xf6b12000)
        libpulsecommon-15.99.so => /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-15.99.so (0xf6a7f000)
        libxcb.so.1 => /lib/i386-linux-gnu/libxcb.so.1 (0xf6a51000)
        libslang.so.2 => /lib/i386-linux-gnu/libslang.so.2 (0xf6867000)
        libncursesw.so.6 => /lib/i386-linux-gnu/libncursesw.so.6 (0xf6825000)
        libtinfo.so.6 => /lib/i386-linux-gnu/libtinfo.so.6 (0xf67f9000)
        libXcursor.so.1 => /lib/i386-linux-gnu/libXcursor.so.1 (0xf67ec000)
        libXinerama.so.1 => /lib/i386-linux-gnu/libXinerama.so.1 (0xf67e7000)
        libXi.so.6 => /lib/i386-linux-gnu/libXi.so.6 (0xf67d2000)
        libXfixes.so.3 => /lib/i386-linux-gnu/libXfixes.so.3 (0xf67ca000)
        libXrandr.so.2 => /lib/i386-linux-gnu/libXrandr.so.2 (0xf67bb000)
        libXss.so.1 => /lib/i386-linux-gnu/libXss.so.1 (0xf67b3000)
        libXxf86vm.so.1 => /lib/i386-linux-gnu/libXxf86vm.so.1 (0xf67ab000)
        libdrm.so.2 => /lib/i386-linux-gnu/libdrm.so.2 (0xf6792000)
        libgbm.so.1 => /lib/i386-linux-gnu/libgbm.so.1 (0xf6780000)
        libwayland-egl.so.1 => /lib/i386-linux-gnu/libwayland-egl.so.1 (0xf677b000)
        libwayland-client.so.0 => /lib/i386-linux-gnu/libwayland-client.so.0 (0xf676b000)
        libwayland-cursor.so.0 => /lib/i386-linux-gnu/libwayland-cursor.so.0 (0xf6760000)
        libxkbcommon.so.0 => /lib/i386-linux-gnu/libxkbcommon.so.0 (0xf6716000)
        libdecor-0.so.0 => /lib/i386-linux-gnu/libdecor-0.so.0 (0xf670c000)
        libsndio.so.7 => /lib/i386-linux-gnu/libsndio.so.7 (0xf66f7000)
        libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xf667b000)
        libdb-5.3.so => /lib/i386-linux-gnu/libdb-5.3.so (0xf648e000)
        libvorbisenc.so.2 => /lib/i386-linux-gnu/libvorbisenc.so.2 (0xf6401000)
        libopus.so.0 => /lib/i386-linux-gnu/libopus.so.0 (0xf63a2000)
        libsystemd.so.0 => /lib/i386-linux-gnu/libsystemd.so.0 (0xf62d3000)
        libffi.so.8 => /lib/i386-linux-gnu/libffi.so.8 (0xf62c7000)
        libX11-xcb.so.1 => /lib/i386-linux-gnu/libX11-xcb.so.1 (0xf62c2000)
        libasyncns.so.0 => /lib/i386-linux-gnu/libasyncns.so.0 (0xf62ba000)
        libapparmor.so.1 => /lib/i386-linux-gnu/libapparmor.so.1 (0xf62a4000)
        libXau.so.6 => /lib/i386-linux-gnu/libXau.so.6 (0xf629e000)
        libXdmcp.so.6 => /lib/i386-linux-gnu/libXdmcp.so.6 (0xf6294000)
        libXrender.so.1 => /lib/i386-linux-gnu/libXrender.so.1 (0xf6286000)
        libwayland-server.so.0 => /lib/i386-linux-gnu/libwayland-server.so.0 (0xf6271000)
        libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xf6241000)
        libxcb-randr.so.0 => /lib/i386-linux-gnu/libxcb-randr.so.0 (0xf622d000)
        liblzma.so.5 => /lib/i386-linux-gnu/liblzma.so.5 (0xf6201000)
        libzstd.so.1 => /lib/i386-linux-gnu/libzstd.so.1 (0xf6132000)
        liblz4.so.1 => /lib/i386-linux-gnu/liblz4.so.1 (0xf610e000)
        libcap.so.2 => /lib/i386-linux-gnu/libcap.so.2 (0xf6103000)
        libgcrypt.so.20 => /lib/i386-linux-gnu/libgcrypt.so.20 (0xf5ffc000)
        libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xf5fd1000)

It is 32bit executable, maybe it is a reason why it's not working

/mnt/c/Users/caiii/Downloads/bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants