diff options
author | DJ Delorie <dj@redhat.com> | 2001-10-19 00:00:55 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2001-10-19 00:00:55 +0000 |
commit | 663dd3780830bfbb264c070a1cfffb0d9aaab33b (patch) | |
tree | 715ec31bcdcb2a9faf7e79560ea12e5873d0825e /ld | |
parent | 6c5108aec9745b56285d00bde80eee7dfeac11ca (diff) | |
download | binutils-663dd3780830bfbb264c070a1cfffb0d9aaab33b.tar.gz binutils-663dd3780830bfbb264c070a1cfffb0d9aaab33b.tar.bz2 binutils-663dd3780830bfbb264c070a1cfffb0d9aaab33b.zip |
* pe-dll.c (autofilter_objectlist): Add startup objects
for profiling.
(auto-export): Constify char * p.
Extract file basename and use strcmp rather than ststr
for object lookup.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/pe-dll.c | 14 |
2 files changed, 16 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 302d0c33ba2..a74d6be73bf 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2001-10-18 Danny Smith <danny_r_smith_2001@yahoo.co.nz> + + * pe-dll.c (autofilter_objectlist): Add startup objects + for profiling. + (auto-export): Constify char * p. + Extract file basename and use strcmp rather than ststr + for object lookup. + 2001-10-18 Chris Demetriou <cgd@broadcom.com> * ldmain.c (get_emulation): Improve comment about the handling diff --git a/ld/pe-dll.c b/ld/pe-dll.c index d635f132b7b..4ca567f3214 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -241,6 +241,8 @@ static autofilter_entry_type autofilter_objlist[] = { "crt2.o", 6 }, { "dllcrt1.o", 9 }, { "dllcrt2.o", 9 }, + { "gcrt1.o", 7 }, + { "gcrt2.o", 7 }, { NULL, 0 } }; @@ -418,7 +420,7 @@ auto_export (abfd, d, n) if (pe_dll_do_default_excludes) { - char * p; + const char * p; int len; if (pe_dll_extra_pe_debug) @@ -440,16 +442,16 @@ auto_export (abfd, d, n) } /* Next, exclude symbols from certain startup objects. */ - afptr = autofilter_objlist; + if (abfd && (p = lbasename (abfd->filename)) ) + { + afptr = autofilter_objlist; while (afptr->name) { - if (abfd && - (p = strstr (abfd->filename, afptr->name)) && - (*(p + afptr->len - 1) == 0)) + if ( strcmp (p, afptr->name) == 0 ) return 0; - afptr ++; + } } /* Don't try to blindly exclude all symbols |