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?
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. Thestatic
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?