diff options
author | Alan Modra <amodra@gmail.com> | 2019-09-25 15:30:53 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-09-26 00:14:44 +0930 |
commit | 9a24a2763daa773328a788988048a7b3f344a548 (patch) | |
tree | 7986f994def57ac9cd6296cbef133128c71aed05 /ld/ChangeLog | |
parent | 6ba2ed48c8cb591c1ccac172be7f895f59080cfa (diff) | |
download | gdb-9a24a2763daa773328a788988048a7b3f344a548.zip gdb-9a24a2763daa773328a788988048a7b3f344a548.tar.gz gdb-9a24a2763daa773328a788988048a7b3f344a548.tar.bz2 |
SORT_BY_INIT_PRIORITY
I was looking at the implementation of this script keyword today and
couldn't remember why we do what we do in get_init_priority, because
the comments explain how the init_priority is encoded but don't say
why it is necessary to extract the priority and sort on that. So
after figuring out why (again), I wrote some more comments.
Then I simplified get_init_priority a little, adding some sanity
checking on the strtoul result. This actually makes get_init_priority
support sorting by numerical suffix more generally, but I figure this
feature would be better as a new keyword (without the .ctors/.dtors
special case), so haven't documented the extension.
* ld.texi (SORT_BY_ALIGNMENT): Reword slightly.
(SORT_BY_INIT_PRIORITY): Elucidate.
* ldlang.c: Include limits.h.
(get_init_priority): Comment. Change param to a section,
return an int. Sanity check priority digits. Support sorting
more sections with trailing digits. Return -1 on error.
(compare_section): Adjust.
Diffstat (limited to 'ld/ChangeLog')
-rw-r--r-- | ld/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index d38c861..c90a587 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2019-09-25 Alan Modra <amodra@gmail.com> + + * ld.texi (SORT_BY_ALIGNMENT): Reword slightly. + (SORT_BY_INIT_PRIORITY): Elucidate. + * ldlang.c: Include limits.h. + (get_init_priority): Comment. Change param to a section, + return an int. Sanity check priority digits. Support sorting + more sections with trailing digits. Return -1 on error. + (compare_section): Adjust. + 2019-09-25 Nick Clifton <nickc@redhat.com> * emultempl/avrelf.em (_before_allocation): Silence build warning |