Fix relocated readonly data in custom sections
Lld doesn't allow relocations in readonly sections
This commit is contained in:
@@ -335,8 +335,10 @@ impl Backend for ObjectBackend {
|
||||
sec.clone().into_bytes(),
|
||||
if writable {
|
||||
SectionKind::Data
|
||||
} else {
|
||||
} else if relocs.is_empty() {
|
||||
SectionKind::ReadOnlyData
|
||||
} else {
|
||||
SectionKind::Data
|
||||
},
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user