Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156690467
D29159.id85416.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
D29159.id85416.diff
View Options
diff --git a/stand/libsa/amd64/_setjmp.S b/stand/libsa/amd64/_setjmp.S
--- a/stand/libsa/amd64/_setjmp.S
+++ b/stand/libsa/amd64/_setjmp.S
@@ -63,7 +63,6 @@
ret
END(_setjmp)
- .weak CNAME(_longjmp)
ENTRY(_longjmp)
movq %rdi,%rdx
/* Restore the mxcsr, but leave exception flags intact. */
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -188,8 +188,8 @@
#else
extern volatile u_char __weak_symbol mfs_root;
extern volatile u_char __weak_symbol mfs_root_end;
-__GLOBL(mfs_root);
-__GLOBL(mfs_root_end);
+__WEAK(mfs_root);
+__WEAK(mfs_root_end);
#define mfs_root_size ((uintptr_t)(&mfs_root_end - &mfs_root))
#endif
#endif
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -566,6 +566,9 @@
#define __GLOBL1(sym) __asm__(".globl " #sym)
#define __GLOBL(sym) __GLOBL1(sym)
+#define __WEAK1(sym) __asm__(".weak " #sym)
+#define __WEAK(sym) __WEAK1(sym)
+
#if defined(__GNUC__)
#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
#else
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
--- a/sys/sys/linker_set.h
+++ b/sys/sys/linker_set.h
@@ -60,8 +60,8 @@
*/
#ifdef __GNUCLIKE___SECTION
#define __MAKE_SET_QV(set, sym, qv) \
- __GLOBL(__CONCAT(__start_set_,set)); \
- __GLOBL(__CONCAT(__stop_set_,set)); \
+ __WEAK(__CONCAT(__start_set_,set)); \
+ __WEAK(__CONCAT(__stop_set_,set)); \
static void const * qv \
__set_##set##_sym_##sym __section("set_" #set) \
__nosanitizeaddress \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 5:24 PM (10 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33140619
Default Alt Text
D29159.id85416.diff (1 KB)
Attached To
Mode
D29159: linker_set: fix globl/weak symbol redefinitions to work on clang 12
Attached
Detach File
Event Timeline
Log In to Comment