dtolnay / linkme

Safe cross-platform linker shenanigans
Apache License 2.0
628 stars 42 forks source link

Added windows support #4

Closed kabergstrom closed 5 years ago

kabergstrom commented 5 years ago

Works on my machine...

It uses the fact that segments are sorted by the linker and '$' as a terminator for the segment name to create unique sorted segment names. .data$a becomes the start segment. .data$b is the segment containing the data. .data$c is the end segment. The static entries in the start and end segments are zero-sized and thus can be used as start and end pointers.

I know that #2 and the linked pages mentioned issues with name length and padding, but I haven't encountered that in my testing. Maybe they are old details that are no longer relevant?

dtolnay commented 5 years ago

Published in 0.1.2.