Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178301183
D20471.1796461487.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D20471.1796461487.diff
View Options
Index: head/contrib/elftoolchain/elfcopy/sections.c
===================================================================
--- head/contrib/elftoolchain/elfcopy/sections.c
+++ head/contrib/elftoolchain/elfcopy/sections.c
@@ -119,21 +119,19 @@
errx(EXIT_FAILURE, "elf_getshstrndx failed: %s",
elf_errmsg(-1));
- is = NULL;
- while ((is = elf_nextscn(ecp->ein, is)) != NULL) {
- if (sh_info == elf_ndxscn(is)) {
- if (gelf_getshdr(is, &ish) == NULL)
- errx(EXIT_FAILURE, "gelf_getshdr failed: %s",
- elf_errmsg(-1));
- if ((name = elf_strptr(ecp->ein, indx, ish.sh_name)) ==
- NULL)
- errx(EXIT_FAILURE, "elf_strptr failed: %s",
- elf_errmsg(-1));
- if (is_remove_section(ecp, name))
- return (1);
- else
- return (0);
- }
+ is = elf_getscn(ecp->ein, sh_info);
+ if (is != NULL) {
+ if (gelf_getshdr(is, &ish) == NULL)
+ errx(EXIT_FAILURE, "gelf_getshdr failed: %s",
+ elf_errmsg(-1));
+ if ((name = elf_strptr(ecp->ein, indx, ish.sh_name)) ==
+ NULL)
+ errx(EXIT_FAILURE, "elf_strptr failed: %s",
+ elf_errmsg(-1));
+ if (is_remove_section(ecp, name))
+ return (1);
+ else
+ return (0);
}
elferr = elf_errno();
if (elferr != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 5, 9:04 AM (23 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42226600
Default Alt Text
D20471.1796461487.diff (1 KB)
Attached To
Mode
D20471: strip: Use a lookup instead of a linear search through sections.
Attached
Detach File
Event Timeline