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(),
|
sec.clone().into_bytes(),
|
||||||
if writable {
|
if writable {
|
||||||
SectionKind::Data
|
SectionKind::Data
|
||||||
} else {
|
} else if relocs.is_empty() {
|
||||||
SectionKind::ReadOnlyData
|
SectionKind::ReadOnlyData
|
||||||
|
} else {
|
||||||
|
SectionKind::Data
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user