Document link_section arbitrary bytes

This commit is contained in:
Ferdia McKeogh 2019-07-17 15:00:14 +02:00
parent d56128d291
commit 8c589bca53
No known key found for this signature in database
GPG key ID: 3833B11039393B9A

View file

@ -1447,6 +1447,9 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span)
// other executable formats. Namely we can only embed a list of bytes,
// nothing with pointers to anything else or relocations. If any relocation
// show up, reject them here.
// #[link_section] may contain arbitrary, or even undefined bytes, but it is
// the consumer's responsibility to ensure all bytes that have been read
// have defined values.
let instance = ty::Instance::mono(tcx, id);
let cid = GlobalId {
instance,