@@ -68,7 +68,12 @@ impl ArchX86 {
6868 _ => None ,
6969 } ,
7070 RelocationFlags :: Elf ( typ) => match typ {
71- elf:: R_386_32 | elf:: R_386_PC32 => Some ( 4 ) ,
71+ elf:: R_386_32
72+ | elf:: R_386_PC32
73+ | elf:: R_386_GOT32
74+ | elf:: R_386_PLT32
75+ | elf:: R_386_GOTOFF
76+ | elf:: R_386_GOTPC => Some ( 4 ) ,
7277 elf:: R_386_16 => Some ( 2 ) ,
7378 _ => None ,
7479 } ,
@@ -272,7 +277,14 @@ impl Arch for ArchX86 {
272277 object:: RelocationFlags :: Coff {
273278 typ : pe:: IMAGE_REL_I386_DIR32 | pe:: IMAGE_REL_I386_REL32 ,
274279 }
275- | object:: RelocationFlags :: Elf { r_type : elf:: R_386_32 | elf:: R_386_PC32 } => {
280+ | object:: RelocationFlags :: Elf {
281+ r_type : elf:: R_386_32
282+ | elf:: R_386_PC32
283+ | elf:: R_386_GOT32
284+ | elf:: R_386_PLT32
285+ | elf:: R_386_GOTOFF
286+ | elf:: R_386_GOTPC ,
287+ } => {
276288 let data =
277289 section. data ( ) ?[ address as usize ..address as usize + 4 ] . try_into ( ) ?;
278290 self . endianness . read_i32_bytes ( data) as i64
@@ -308,7 +320,16 @@ impl Arch for ArchX86 {
308320 pe:: IMAGE_REL_I386_REL32 => Some ( "IMAGE_REL_I386_REL32" ) ,
309321 _ => None ,
310322 } ,
311- _ => None ,
323+ RelocationFlags :: Elf ( typ) => match typ {
324+ elf:: R_386_32 => Some ( "R_386_32" ) ,
325+ elf:: R_386_PC32 => Some ( "R_386_PC32" ) ,
326+ elf:: R_386_GOT32 => Some ( "R_386_GOT32" ) ,
327+ elf:: R_386_PLT32 => Some ( "R_386_PLT32" ) ,
328+ elf:: R_386_GOTOFF => Some ( "R_386_GOTOFF" ) ,
329+ elf:: R_386_GOTPC => Some ( "R_386_GOTPC" ) ,
330+ elf:: R_386_16 => Some ( "R_386_16" ) ,
331+ _ => None ,
332+ } ,
312333 } ,
313334 Architecture :: X86_64 => match flags {
314335 RelocationFlags :: Coff ( typ) => match typ {
0 commit comments