summaryrefslogtreecommitdiffstats
path: root/src/libr-bfd.c
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2026-01-25 18:29:16 +0100
committerSlávek Banko <slavek.banko@axis.cz>2026-01-25 18:29:34 +0100
commitb471c5f6213db85a3ac35e98a0a1054dc9eb9ad3 (patch)
tree628a16ea038d55db2867aeef6fdbef30b9aa1c0e /src/libr-bfd.c
parent38141ddb71b200c6e2dd629aed6e7bc51e8ad7a6 (diff)
downloadlibr-master.tar.gz
libr-master.zip
Update for API change in binutils 2.46.HEADmaster
According to the commit message in binutils, it was a simple renaming of `*_set_reloc` to `*_finalize_section_relocs` without changing the functionality. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/libr-bfd.c')
-rw-r--r--src/libr-bfd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libr-bfd.c b/src/libr-bfd.c
index 9d72cce..b472543 100644
--- a/src/libr-bfd.c
+++ b/src/libr-bfd.c
@@ -320,12 +320,22 @@ int build_output(libr_file *file_handle)
oscn = iscn->output_section;
reloc_size = bfd_get_reloc_upper_bound(ihandle, iscn);
if(reloc_size == 0)
+ {
+ #ifdef HAVE_BFD_2_46
+ bfd_finalize_section_relocs(ohandle, oscn, NULL, 0);
+ #else
bfd_set_reloc(ohandle, oscn, NULL, 0);
+ #endif
+ }
else
{
reloc_buffer = malloc(reloc_size);
reloc_count = bfd_canonicalize_reloc(ihandle, iscn, reloc_buffer, symtab_buffer);
+ #ifdef HAVE_BFD_2_46
+ bfd_finalize_section_relocs(ohandle, oscn, reloc_buffer, reloc_count);
+ #else
bfd_set_reloc(ohandle, oscn, reloc_buffer, reloc_count);
+ #endif
}
if(