Uh oh!
There was an error while loading. Please reload this page.
RFC: linker placement attribute - #44
Conversation
mcpherrinm
commented
Apr 21, 2014
Your RFC seems to show: Which differs from your proposed implementation, which is: I'm unclear how that version is supposed to work -- is this creating a "T" at location 123? If so, why isn't it static t: &'static T = 123;? If not, the syntax is not what I'd expect at all - T = 123; makes me think T must be a pointer type. But then how is that different from just having a pointer to that explicit location without your additions? So I must conclude this is putting a "T" at location 123, which the syntax seems very misleading for. The RFC seems much better in that respect, putting the address in an attribute. If nothing else, the RFC should be the same as any proposed implementation. |
farcaller
commented
Apr 21, 2014
I've updated the actual implementation as per suggestion of eddyb on IRC. The original RFC proposal is a bit more tricky to maintain as it also requires modification to parser, I would rather settle with My current code is using externs and expects linker script to provide the actual placement address, so I will update the RFC to match my current implementation. |
liigo
commented
Apr 23, 2014
@farcaller Why not update your implementation to match the RFC? |
farcaller
commented
Apr 29, 2014
I've updated RFC with two alternative options. |
alexcrichton
commented
Jun 5, 2014
Thanks for the RFC! This is something that can definitely be done today, as you discovered with linker scripts or casting integers to pointers. For now, this is something we'd like to postpone until later, although we may perhaps consider this in the future when taking a close look at how Rust fits into the embedded systems space. Closing. |
No description provided.