GithubHelp home page GithubHelp logo

wilvk / practical-binary Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 9.0 6.43 MB

Code samples from Practical Binary Analysis

Makefile 8.48% C 32.67% C++ 53.68% Python 2.89% Assembly 1.57% Shell 0.17% Dockerfile 0.54%

practical-binary's People

Contributors

wilvk avatar webhat avatar

Stargazers

 avatar ひるき avatar  avatar  avatar Di Mita Hakini avatar Li Liangjie avatar AjCaroline avatar Hadi Asemi avatar  avatar Elisey Shemyakin avatar Alex  avatar acceler avatar  avatar Robert Cecil William'JR Hamilton  avatar  avatar Emre S avatar  avatar Ben Mason avatar  avatar Goyotan avatar

Watchers

 avatar James Cloos avatar  avatar GP avatar

practical-binary's Issues

Error: `error: ‘bfd_get_section_flags’ was not declared in this scope; did you mean ‘bfd_set_section_flags’?`

Sometime ago I tried out the labs, and everything worked fine and it compiled fine with binutils-dev (=2.33-2ubuntu1.2) on ubuntu.

After getting the attached error I did a little investigation and saw the version was now 2.34. It seems that a number of section related macros changed, including bfd_get_section_flags being deleted. And the signature was changed for the functions bfd_section_vma, bfd_section_size and bfd_section_name, among others.

g++ -std=c++11 -c ../inc/loader.cc
../inc/loader.cc: In function ‘int load_sections_bfd(bfd*, Binary*)’:
../inc/loader.cc:168:17: error: ‘bfd_get_section_flags’ was not declared in this scope; did you mean ‘bfd_set_section_flags’?
  168 |     bfd_flags = bfd_get_section_flags(bfd_h, bfd_sec);
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 bfd_set_section_flags
../inc/loader.cc:179:31: error: cannot convert ‘bfd*’ to ‘const asection*’ {aka ‘const bfd_section*’}
  179 |     vma     = bfd_section_vma(bfd_h, bfd_sec);
      |                               ^~~~~
      |                               |
      |                               bfd*
In file included from ../inc/loader.cc:10:
/usr/include/bfd.h:1212:34: note:   initializing argument 1 of ‘bfd_vma bfd_section_vma(const asection*)’
 1212 | bfd_section_vma (const asection *sec)
      |                  ~~~~~~~~~~~~~~~~^~~
../inc/loader.cc:180:32: error: cannot convert ‘bfd*’ to ‘const asection*’ {aka ‘const bfd_section*’}
  180 |     size    = bfd_section_size(bfd_h, bfd_sec);
      |                                ^~~~~
      |                                |
      |                                bfd*
In file included from ../inc/loader.cc:10:
/usr/include/bfd.h:1206:35: note:   initializing argument 1 of ‘bfd_size_type bfd_section_size(const asection*)’
 1206 | bfd_section_size (const asection *sec)
      |                   ~~~~~~~~~~~~~~~~^~~
../inc/loader.cc:181:32: error: cannot convert ‘bfd*’ to ‘const asection*’ {aka ‘const bfd_section*’}
  181 |     secname = bfd_section_name(bfd_h, bfd_sec);
      |                                ^~~~~
      |                                |
      |                                bfd*
In file included from ../inc/loader.cc:10:
/usr/include/bfd.h:1200:35: note:   initializing argument 1 of ‘const char* bfd_section_name(const asection*)’
 1200 | bfd_section_name (const asection *sec)
      |                   ~~~~~~~~~~~~~~~~^~~
make: *** [Makefile:9: loader.o] Error 1

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.