-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readelf complains that .note.rustc is malformed #27372
Comments
That section contains the metadata for the library, there does appear to be some sort of defined structure for the section, so maybe we could try and fit into that a bit better? We'd need to figure out how to prevent tools like |
This looks related to #26764 -- readelf doesn't complain about the libraries generated after applying the referenced patch (tylerwhall/rust@fc91059). |
Turns out that this can actually crash the GNU dynamic linker - me and @solson both observed this with a patch that increases the size of metadata (by serializing MIR for everything). Changing the section name to |
Oh, turns out that's #26764. |
[MIR] Add Storage{Live,Dead} statements to emit llvm.lifetime.{start,end}. Storage live ranges are tracked for all MIR variables and temporaries with a drop scope. `StorageLive` is lowered to `llvm.lifetime.start` and `StorageDead` to `llvm.lifetime.end`. There are some improvements possible here, such as: * pack multiple storage liveness statements by using the index of first local + `u64` bitset * enforce that locals are not directly accessed outside their storage live range * shrink storage live ranges for never-borrowed locals to initialization -> last use * emit storage liveness statements for *all* temporaries * however, the remaining ones are *always* SSA immediates, so they'd be noop in MIR trans * could have a flag on the temporary that its storage is irrelevant (a la C's old `register`) * would also deny borrows if necessary * this seems like an overcompliation and with packing & optimizations it may be pointless Even in the current state, it helps stage2 `rustc` compile `boiler` without overflowing (see #35408). A later addition fixes #26764 and closes #27372 by emitting `.section` directives for dylib metadata to avoid them being allocated into memory or read as `.note`. For this PR, those bugs were tripping valgrind.
After building rustc 1.1.0, if I run
readelf --section-headers --note
over the shared libraries produced, I see output like the following:Based on the section list, it appears that the malformed section is .note.rustc
Built using the x86_64 bootstrap rustc:
The text was updated successfully, but these errors were encountered: