Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110222331
D48700.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
799 B
Referenced Files
None
Subscribers
None
D48700.diff
View Options
diff --git a/lib/csu/common/crtbegin.c b/lib/csu/common/crtbegin.c
--- a/lib/csu/common/crtbegin.c
+++ b/lib/csu/common/crtbegin.c
@@ -66,19 +66,27 @@
(crt_func)-1
};
+extern const char startof_dtors[] __asm(".startof..dtors")
+ __weak_symbol __hidden;
+extern const char sizeof_dtors[] __asm(".sizeof..dtors")
+ __weak_symbol __hidden;
+
static void
__do_global_dtors_aux(void)
{
crt_func fn;
+ uintptr_t dtors_end;
int n;
#ifdef SHARED
run_cxa_finalize();
#endif
+ dtors_end = (uintptr_t)&startof_dtors + (uintptr_t)&sizeof_dtors;
for (n = 1;; n++) {
fn = __DTOR_LIST__[n];
- if (fn == (crt_func)0 || fn == (crt_func)-1)
+ if (fn == (crt_func)0 || fn == (crt_func)-1 || (dtors_end > 0 &&
+ (uintptr_t)&__DTOR_LIST__[n] >= dtors_end))
break;
fn();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 16, 8:11 AM (15 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16325157
Default Alt Text
D48700.diff (799 B)
Attached To
Mode
D48700: Workaround for crtbegin.o or crtend.o not being included into the link
Attached
Detach File
Event Timeline
Log In to Comment