@@ -377,6 +377,7 @@ pub fn create_wrapper_file(
377
377
SectionFlags :: Elf { sh_flags : elf:: SHF_EXCLUDE as u64 } ;
378
378
}
379
379
BinaryFormat :: Xcoff => {
380
+ // AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
380
381
file. add_section ( Vec :: new ( ) , b".text" . to_vec ( ) , SectionKind :: Text ) ;
381
382
file. section_mut ( section) . flags =
382
383
SectionFlags :: Xcoff { s_flags : xcoff:: STYP_INFO as u32 } ;
@@ -389,7 +390,7 @@ pub fn create_wrapper_file(
389
390
value : offset + 4 ,
390
391
size : 0 ,
391
392
kind : SymbolKind :: Unknown ,
392
- scope : SymbolScope :: Dynamic ,
393
+ scope : SymbolScope :: Compilation ,
393
394
weak : false ,
394
395
section : SymbolSection :: Section ( section) ,
395
396
flags : SymbolFlags :: Xcoff {
@@ -488,6 +489,7 @@ pub fn create_compressed_metadata_file_for_xcoff(
488
489
symbol_name : & str ,
489
490
) -> Vec < u8 > {
490
491
assert ! ( file. format( ) == BinaryFormat :: Xcoff ) ;
492
+ // AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
491
493
file. add_section ( Vec :: new ( ) , b".text" . to_vec ( ) , SectionKind :: Text ) ;
492
494
let data_section = file. add_section ( Vec :: new ( ) , b".data" . to_vec ( ) , SectionKind :: Data ) ;
493
495
let section = file. add_section ( Vec :: new ( ) , b".info" . to_vec ( ) , SectionKind :: Debug ) ;
0 commit comments