Address @bjorn3's comments.
This commit is contained in:
parent
18fdca37cf
commit
e31661cb9e
@ -377,6 +377,7 @@ pub fn create_wrapper_file(
|
|||||||
SectionFlags::Elf { sh_flags: elf::SHF_EXCLUDE as u64 };
|
SectionFlags::Elf { sh_flags: elf::SHF_EXCLUDE as u64 };
|
||||||
}
|
}
|
||||||
BinaryFormat::Xcoff => {
|
BinaryFormat::Xcoff => {
|
||||||
|
// AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
|
||||||
file.add_section(Vec::new(), b".text".to_vec(), SectionKind::Text);
|
file.add_section(Vec::new(), b".text".to_vec(), SectionKind::Text);
|
||||||
file.section_mut(section).flags =
|
file.section_mut(section).flags =
|
||||||
SectionFlags::Xcoff { s_flags: xcoff::STYP_INFO as u32 };
|
SectionFlags::Xcoff { s_flags: xcoff::STYP_INFO as u32 };
|
||||||
@ -389,7 +390,7 @@ pub fn create_wrapper_file(
|
|||||||
value: offset + 4,
|
value: offset + 4,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: SymbolKind::Unknown,
|
kind: SymbolKind::Unknown,
|
||||||
scope: SymbolScope::Dynamic,
|
scope: SymbolScope::Compilation,
|
||||||
weak: false,
|
weak: false,
|
||||||
section: SymbolSection::Section(section),
|
section: SymbolSection::Section(section),
|
||||||
flags: SymbolFlags::Xcoff {
|
flags: SymbolFlags::Xcoff {
|
||||||
@ -488,6 +489,7 @@ pub fn create_compressed_metadata_file_for_xcoff(
|
|||||||
symbol_name: &str,
|
symbol_name: &str,
|
||||||
) -> Vec<u8> {
|
) -> Vec<u8> {
|
||||||
assert!(file.format() == BinaryFormat::Xcoff);
|
assert!(file.format() == BinaryFormat::Xcoff);
|
||||||
|
// AIX system linker may aborts if it meets a valid XCOFF file in archive with no .text, no .data and no .bss.
|
||||||
file.add_section(Vec::new(), b".text".to_vec(), SectionKind::Text);
|
file.add_section(Vec::new(), b".text".to_vec(), SectionKind::Text);
|
||||||
let data_section = file.add_section(Vec::new(), b".data".to_vec(), SectionKind::Data);
|
let data_section = file.add_section(Vec::new(), b".data".to_vec(), SectionKind::Data);
|
||||||
let section = file.add_section(Vec::new(), b".info".to_vec(), SectionKind::Debug);
|
let section = file.add_section(Vec::new(), b".info".to_vec(), SectionKind::Debug);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user