File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1818 - name : Test
1919 run : |
2020 cargo test
21+ - name : Check (big-endian)
22+ run : |
23+ rustup target add powerpc64-unknown-linux-gnu
24+ cargo check --target powerpc64-unknown-linux-gnu
2125
2226 fmt :
2327 name : rustfmt
Original file line number Diff line number Diff line change 11[package ]
22name = " ar_archive_writer"
3- version = " 0.3.2 "
3+ version = " 0.3.3 "
44edition = " 2021"
55license = " Apache-2.0 WITH LLVM-exception"
66description = " A writer for object file ar archives"
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ pub(crate) const NULL_THUNK_DATA_SUFFIX: &[u8] = b"_NULL_THUNK_DATA";
3131
3232macro_rules! u16 {
3333 ( $val: expr) => {
34- object:: U16 :: new( object:: NativeEndian , $val)
34+ object:: U16 :: new( object:: LittleEndian , $val)
3535 } ;
3636}
3737
3838macro_rules! u32 {
3939 ( $val: expr) => {
40- object:: U32 :: new( object:: NativeEndian , $val)
40+ object:: U32 :: new( object:: LittleEndian , $val)
4141 } ;
4242}
4343
@@ -49,7 +49,7 @@ pub(crate) fn get_short_import_symbol(
4949 let mut offset = 0 ;
5050 let header = ImportObjectHeader :: parse ( buf, & mut offset) . map_err ( Error :: other) ?;
5151 let data = header. parse_data ( buf, & mut offset) . map_err ( Error :: other) ?;
52- let is_ec = header. machine . get ( object:: NativeEndian ) == object:: pe:: IMAGE_FILE_MACHINE_ARM64EC ;
52+ let is_ec = header. machine . get ( object:: LittleEndian ) == object:: pe:: IMAGE_FILE_MACHINE_ARM64EC ;
5353
5454 let name = data. symbol ( ) ;
5555 let demangled_name = is_ec
@@ -77,7 +77,7 @@ pub(crate) fn get_short_import_symbol(
7777 f ( demangled_name. as_ref ( ) ) ?;
7878
7979 // For Arm64EC, also the EC import symbol and thunk.
80- if header. machine . get ( object:: NativeEndian ) == object:: pe:: IMAGE_FILE_MACHINE_ARM64EC {
80+ if header. machine . get ( object:: LittleEndian ) == object:: pe:: IMAGE_FILE_MACHINE_ARM64EC {
8181 const IMP_PREFIX : & [ u8 ] = b"__imp_aux_" ;
8282 f ( & IMP_PREFIX
8383 . iter ( )
You can’t perform that action at this time.
0 commit comments