Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136935662
D20444.id57995.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20444.id57995.diff
View Options
Index: contrib/elftoolchain/elfcopy/elfcopy.h
===================================================================
--- contrib/elftoolchain/elfcopy/elfcopy.h
+++ contrib/elftoolchain/elfcopy/elfcopy.h
@@ -111,6 +111,7 @@
};
struct segment;
+TAILQ_HEAD(sectionlist, section);
/* Internal data structure for sections. */
struct section {
Index: contrib/elftoolchain/elfcopy/sections.c
===================================================================
--- contrib/elftoolchain/elfcopy/sections.c
+++ contrib/elftoolchain/elfcopy/sections.c
@@ -314,18 +314,18 @@
{
struct section *s;
- if (!tail) {
+ if (tail || TAILQ_EMPTY(&ecp->v_sec) ||
+ TAILQ_LAST(&ecp->v_sec, sectionlist)->off <= sec->off) {
+ TAILQ_INSERT_TAIL(&ecp->v_sec, sec, sec_list);
+ } else {
TAILQ_FOREACH(s, &ecp->v_sec, sec_list) {
if (sec->off < s->off) {
TAILQ_INSERT_BEFORE(s, sec, sec_list);
- goto inc_nos;
+ break;
}
}
}
- TAILQ_INSERT_TAIL(&ecp->v_sec, sec, sec_list);
-
-inc_nos:
if (sec->pseudo == 0)
ecp->nos++;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 6:01 PM (18 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25784874
Default Alt Text
D20444.id57995.diff (1 KB)
Attached To
Mode
D20444: strip: Optimize for insertions at the tail of the section list.
Attached
Detach File
Event Timeline
Log In to Comment