Git Product home page Git Product logo

Comments (4)

haberman avatar haberman commented on May 5, 2024

I don't quite follow. Section names aren't hierarchical; they don't have multiple "levels". Am I missing something?

Could you give an example of the output you're getting and the output you would like to be getting?

from bloaty.

Phyllostachys avatar Phyllostachys commented on May 5, 2024

So here is some output I'm getting:

> bloaty.exe -s vm someElf.axf
     VM SIZE                       FILE SIZE
 --------------                 --------------
  83.9%   117Ki .text             117Ki  16.4%
  12.7%  17.9Ki [Unmapped]       40.8Ki   5.7%
   1.5%  2.10Ki .bss                  0   0.0%
   1.1%  1.48Ki .data            1.48Ki   0.2%
   0.6%     840 .ARM.exidx          840   0.1%
   0.2%     288 .ARM.extab          288   0.0%
   0.1%     148 [ELF Headers]    1.04Ki   0.1%
   0.0%       0 .ARM.attributes      46   0.0%
   0.0%       0 .comment            224   0.0%
   0.0%       0 .debug_abbrev    23.8Ki   3.3%
   0.0%       0 [Other]           532Ki  74.1%
 100.0%   140Ki TOTAL             719Ki 100.0%

And here is a piece of the map file:

                   ...
 .text          0x00019a14     0x57d8 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libstdc++_s.a(cp-demangle.o)
                0x0001f10c                __cxa_demangle
                0x0001f1d0                __gcclibcxx_demangle_callback
 .text.fmod     0x0001f1ec       0xb4 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-w_fmod.o)
                0x0001f1ec                fmod
 .text.pow      0x0001f2a0      0x2f4 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-w_pow.o)
                0x0001f2a0                pow
 .text.__ieee754_fmod
                0x0001f594      0x27c c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-e_fmod.o)
                0x0001f594                __ieee754_fmod
 .text.__ieee754_pow
                0x0001f810      0xa88 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-e_pow.o)
                0x0001f810                __ieee754_pow
                   ...

Those are just some sections loaded from standard libraries but there are also sections for code that I've written. That is...

 .text._ZN11DataManager8writeLogEPKcs
                0x00017104       0xa0 ./src/DataManager.o
                0x00017104                DataManager::writeLog(char const*, short)
 .text._ZN11DataManager11loadNextLogEPKc
                0x000171a4      0x14c ./src/DataManager.o
                0x000171a4                DataManager::loadNextLog(char const*)
 .text._ZN11DataManager14releaseNextLogEv
                0x000172f0      0x130 ./src/DataManager.o
                0x000172f0                DataManager::releaseNextLog()
 .text._ZN11DataManagerC2EPKcPc
                0x00017420      0x240 ./src/DataManager.o
                0x00017420                DataManager::DataManager(char const*, char*)
                0x00017420                DataManager::DataManager(char const*, char*)

What I'd like to get is something like this (I only filled in the VM size and names)

     VM SIZE                                                                            FILE SIZE
 --------------                                                                    --------------
  83.9%   117Ki .text                                                             117Ki  16.4%
            576 .text._ZN11DataManagerC2EPKcPc
            332 .text._ZN11DataManager11loadNextLogEPKc
            304 .text._ZN11DataManager14releaseNextLogEv
            160 .text._ZN11DataManager8writeLogEPKcs

I guess my assumption was that this info was like this in the elf file but doing some poking around with objdump, it seems I want something that is a combination of the section and symbol tables. Hmmm.

from bloaty.

haberman avatar haberman commented on May 5, 2024

Hmm, I'm not familiar with those map files you pasted, do you know where that data is coming from? If the binary actually had sections named things like .text._ZN11DataManagerC2EPKcPc then Bloaty should be showing them!

it seems I want something that is a combination of the section and symbol tables

Have you tried bloaty -s vm -d sections,symbols someElf.axf? That should be a pretty nice breakdown by both section and symbol.

from bloaty.

Phyllostachys avatar Phyllostachys commented on May 5, 2024

That does look more like what I was wanting. Thanks!

from bloaty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.