@@ -33,6 +33,10 @@ pub type Elf64_Word = u32;
33
33
pub type Elf64_Off = u64 ;
34
34
pub type Elf64_Addr = u64 ;
35
35
pub type Elf64_Xword = u64 ;
36
+ pub type Elf64_Sxword = i64 ;
37
+
38
+ pub type Elf32_Section = u16 ;
39
+ pub type Elf64_Section = u16 ;
36
40
37
41
pub enum fpos64_t { } // TODO: fill this out with a struct
38
42
@@ -479,6 +483,24 @@ s! {
479
483
pub dlpi_tls_data: * mut :: c_void,
480
484
}
481
485
486
+ pub struct Elf32_Sym {
487
+ pub st_name: Elf32_Word ,
488
+ pub st_value: Elf32_Addr ,
489
+ pub st_size: Elf32_Word ,
490
+ pub st_info: :: c_uchar,
491
+ pub st_other: :: c_uchar,
492
+ pub st_shndx: Elf32_Section ,
493
+ }
494
+
495
+ pub struct Elf64_Sym {
496
+ pub st_name: Elf64_Word ,
497
+ pub st_info: :: c_uchar,
498
+ pub st_other: :: c_uchar,
499
+ pub st_shndx: Elf64_Section ,
500
+ pub st_value: Elf64_Addr ,
501
+ pub st_size: Elf64_Xword ,
502
+ }
503
+
482
504
pub struct Elf32_Phdr {
483
505
pub p_type: Elf32_Word ,
484
506
pub p_offset: Elf32_Off ,
@@ -501,6 +523,32 @@ s! {
501
523
pub p_align: Elf64_Xword ,
502
524
}
503
525
526
+ pub struct Elf32_Shdr {
527
+ pub sh_name: Elf32_Word ,
528
+ pub sh_type: Elf32_Word ,
529
+ pub sh_flags: Elf32_Word ,
530
+ pub sh_addr: Elf32_Addr ,
531
+ pub sh_offset: Elf32_Off ,
532
+ pub sh_size: Elf32_Word ,
533
+ pub sh_link: Elf32_Word ,
534
+ pub sh_info: Elf32_Word ,
535
+ pub sh_addralign: Elf32_Word ,
536
+ pub sh_entsize: Elf32_Word ,
537
+ }
538
+
539
+ pub struct Elf64_Shdr {
540
+ pub sh_name: Elf64_Word ,
541
+ pub sh_type: Elf64_Word ,
542
+ pub sh_flags: Elf64_Xword ,
543
+ pub sh_addr: Elf64_Addr ,
544
+ pub sh_offset: Elf64_Off ,
545
+ pub sh_size: Elf64_Xword ,
546
+ pub sh_link: Elf64_Word ,
547
+ pub sh_info: Elf64_Word ,
548
+ pub sh_addralign: Elf64_Xword ,
549
+ pub sh_entsize: Elf64_Xword ,
550
+ }
551
+
504
552
pub struct ucred {
505
553
pub pid: :: pid_t,
506
554
pub uid: :: uid_t,
0 commit comments