]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Update main/backtrace.c to deal with changes in binutils 2.34.
authorJaco Kroon <jaco@uls.co.za>
Mon, 16 Mar 2020 10:11:11 +0000 (12:11 +0200)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 17 Mar 2020 14:14:16 +0000 (09:14 -0500)
commitaf414ef015a6427b34c8f942f8e525dcda277347
tree0831937d6bce3e0011131df6e7404a764d9806f2
parent83981ad7833908736e9d494019a4ffeb1c2ce8ff
Update main/backtrace.c to deal with changes in binutils 2.34.

binutils 2.34 merged this commit:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;\
h=fd3619828e94a24a92cddec42cbc0ab33352eeb4

Which effectively does things like:

-#define bfd_section_size(bfd, ptr) ((ptr)->size)
-#define bfd_get_section_size(ptr) ((ptr)->size)

+#define bfd_section_size(sec) ((sec)->size)

So in order to remain backwards compatible we need to detect this API
change, and adjust accordingly.  The simplest is to notice that the
bfd_get_section_size and bfd_get_section_vma MACROs are no longer
defined, and define then onto the new API.  The alternative is to litter
the code with a number of #ifdef #else #endif splatters right through
the code.

Change-Id: I3efe0f8e8f3e338d16fcbc2b26a505367b6e172f
main/backtrace.c