From 5b2a6ca6265d479d1b20795fa6d0f7149f6543a6 Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Tue, 17 Oct 2023 17:26:17 +0300 Subject: [PATCH] Change relocation type to R_X86_64_32 --- examples/write_obj/write_obj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/write_obj/write_obj.cpp b/examples/write_obj/write_obj.cpp index aa57634..5de1a37 100644 --- a/examples/write_obj/write_obj.cpp +++ b/examples/write_obj/write_obj.cpp @@ -108,7 +108,7 @@ int main( void ) relocation_section_accessor rela( writer, rel_sec ); // Add relocation entry (adjust address at offset 11) rela.add_entry( place_to_adjust, sym_to_adjust, - (unsigned char)R_386_RELATIVE ); + (unsigned char)R_X86_64_32 ); // Another method to add the same relocation entry at one step is: // rela.add_entry( stra, "msg",