wilvk / practical-binary Goto Github PK
View Code? Open in Web Editor NEWCode samples from Practical Binary Analysis
Code samples from Practical Binary Analysis
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.