Both bfd and gold accept:
foo = 1K;
bar = 1M;
zed = 1H;
And lowercase forms: k, m, h.
Patch adds support for that.
Differential D24194
[ELF] - Linkerscript: add support for suffixes in numbers. grimar on Sep 2 2016, 7:46 AM. Authored by
Details Both bfd and gold accept: And lowercase forms: k, m, h.
Diff Detail Event Timeline
Comment Actions LGTM with this change.
|
Something's not right with this function. You seems to be mixing two different concepts, base and multiplier in this function, which confused me while reading this code. You cannot use K/M suffixes for hex numbers, so hex numbers should be handled first.
The code should be something like this.