Bug 9892 - More "safe" duplicated symbols, from OpenBSD
Summary: More "safe" duplicated symbols, from OpenBSD
Status: NEW
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.0.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 14:04 UTC by Vadim Zhukov
Modified: 2013-05-16 21:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Zhukov 2013-05-16 14:04:36 UTC
report_duplicate() function in buildtools/wafsamba/symbols.py is only called during running tests, so I opened the issue here; if I am wrong, then sorry and please feel free to correct me.

The list of "safe" to be duplicated symbols is highly platform-dependent. Here are some additions from OpenBSD, in a few groups. I'm not an expert at linker and compiler internals, so I could be wrong somewhere, of course.

ld.so-specific hooks:

__data_start
__data_end
__got_start
__got_end

C++-specific hooks for libc:

__cxa_atexit
__cxa_finalize

GCC CRT specifics named "java class registration hooks" (WTF?! - I don't know, either):

_Jv_RegisterClasses

Hardware-specific:

__clear_cache

Old threading library compatibility goo:

__gthread_active_p
__gthread_mutex_lock
__gthread_mutex_unlock

Other symbols added by GCC (yes, such much; no, I don't know why do they show up here and not there):

_Unwind_Backtrace
_Unwind_DeleteException
_Unwind_FindEnclosingFunction
_Unwind_Find_FDE
_Unwind_ForcedUnwind
_Unwind_GetCFA
_Unwind_GetDataRelBase
_Unwind_GetGR
_Unwind_GetIP
_Unwind_GetIPInfo
_Unwind_GetLanguageSpecificData
_Unwind_GetRegionStart
_Unwind_GetTextRelBase
_Unwind_RaiseException
_Unwind_Resume
_Unwind_Resume_or_Rethrow
_Unwind_SetGR
_Unwind_SetIP
__absvdi2
__absvsi2
__addvdi3
__addvsi3
__ashldi3
__ashrdi3
__clzdi2
__clzsi2
__cmpdi2
__ctzdi2
__ctzsi2
__deregister_frame
__deregister_frame_info
__deregister_frame_info_bases
__divdc3
__divdi3
__divsc3
__divxc3
__ffsdi2
__ffssi2
__fixdfdi
__fixsfdi
__fixunsdfdi
__fixunsdfsi
__fixunssfdi
__fixunssfsi
__fixunsxfdi
__fixunsxfsi
__fixxfdi
__floatdidf
__floatdisf
__floatdixf
__floatundidf
__floatundisf
__floatundixf
__frame_state_for
__gcc_personality_v0
__gnat_default_lock
__gnat_default_unlock
__gnat_install_locks
__lshrdi3
__moddi3
__muldc3
__muldi3
__mulsc3
__mulvdi3
__mulvsi3
__mulxc3
__negdi2
__negvdi2
__negvsi2
__paritydi2
__paritysi2
__popcountdi2
__popcountsi2
__powidf2
__powisf2
__powixf2
__register_frame
__register_frame_info
__register_frame_info_bases
__register_frame_info_table
__register_frame_info_table_bases
__register_frame_table
__subvdi3
__subvsi3
__ucmpdi2
__udiv_w_sdiv
__udivdi3
__udivmoddi4
__umoddi3

Some or all of those could be probably added to the list of "safe" symbols. I want to discuss, what precisely, and then (if agreed) I'll prepare and send a patch.