When I ask a symbol map to the linker, it always gives me the labels out of any specific order... why?
Ah! right! It may be the order the assembler filled in the hash table entries, right?
Anyway, how can I make ld order the symbols by ascending relocation address order?
JJ
Symbol map order...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Symbol map order...
by relocation order ?? you mean sorted by address?
just tried with sort, but that didn't work well ... that sounds like a job for a perl script ...
just tried with sort, but that didn't work well ... that sounds like a job for a perl script ...
Re:Symbol map order...
Yes... by relocation address order!Pype.Clicker wrote: by relocation order ?? you mean sorted by address?
I'm using diferent load addresses than relocation addresses (the address that the linker links the sections at) so I made the difference...
I'm a bit poor on the number of programming languages I know... I only know x86 assembly, C, make and CASIO BASIC (not considering a bit of bash nor markup languages)...just tried with sort, but that didn't work well ... that sounds like a job for a perl script ...
I know I need to correct it, but for now I've frequented no programming courses so I don't want to learn thing just to say that i know them!
But seems a text manipulation language would be useful enough... perl is of this sort, isn't it? Or is it sed?
JJ
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Symbol map order...
SED is a sort of on-the-fly-text-editor ... that is, you can stream some text in and require that every occurence of "Hello World" becomes "Salutations" ... Perl is somehow a mix between C and BASIC syntax with that, among other things, has native operators to do the above ... and afaik, it also has a list-sorting operation.Jo?o Jer?nimo wrote: But seems a text manipulation language would be useful enough... perl is of this sort, isn't it? Or is it sed?
Alternatively, you could do the script operation in pure C, but that would just turn out to be a boring-to-recompile, error-prone implementation compared to a PERL script for the same job ...