Skip to content

Instantly share code, notes, and snippets.

@mauri870
Last active February 18, 2020 17:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauri870/52bffe48732efa6806e80158a3d78c32 to your computer and use it in GitHub Desktop.
Save mauri870/52bffe48732efa6806e80158a3d78c32 to your computer and use it in GitHub Desktop.
Asterisk PABX patch for GNU BFD in Debian Bullseye — undefined reference to bfd_get_section_flags, bfd_get_section_vma and bfd_get_section_size
diff --git a/main/backtrace.c b/main/backtrace.c
index 2623d7ff87..9b80622b04 100644
--- a/main/backtrace.c
+++ b/main/backtrace.c
@@ -124,12 +124,12 @@ static void process_section(bfd *bfdobj, asection *section, void *obj)
offset = data->pc - (data->dynamic ? (bfd_vma)(uintptr_t) data->dli.dli_fbase : 0);
- if (!(bfd_get_section_flags(bfdobj, section) & SEC_ALLOC)) {
+ if (!(bfd_section_flags(section) & SEC_ALLOC)) {
return;
}
- vma = bfd_get_section_vma(bfdobj, section);
- size = bfd_get_section_size(section);
+ vma = bfd_section_vma(section);
+ size = bfd_section_size(section);
if (offset < vma || offset >= vma + size) {
/* Not in this section */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment