-
Notifications
You must be signed in to change notification settings - Fork 619
os/board/rtl8730e: remove rtw_timer.c, rtw_wakelock.c, rtw_atomic.c from lib_wifi_com_sec.a #7051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
os/board/rtl8730e: remove rtw_timer.c, rtw_wakelock.c, rtw_atomic.c from lib_wifi_com_sec.a #7051
Conversation
ZivLow
commented
Nov 19, 2025
- add linker option --whole-archive so that all the symbols inside static libaries will be looked through
- during linking stage, will encounter undefined reference to pmu_yield_os_check, pmu_acquire_wakelock, pmu_release_wakelock when using linker option --whole-archive on EXTRA_LIBS, because linker will looking through all the symbols
- remove rtw_timer.c, rtw_wakelock.c, rtw_atomic.c from lib_wifi_com_sec.a, so that linker will use the customized rtw_timer.c, rtw_wakelock.c, rtw_atomic.c source files compiled directly at TizenRT, instead of using the definitions from lib_wifi_com_sec.a
- in order to make linker prefer the rtw_timer, rtw_wakelock, rtw_atomic symbols compiled directly at TizenRT, these symbols have been changed to weak inside the wifi static libraries lib_wifi_inic_ap.a, lib_wpa_lite.a, lib_wps.a
…TRA_LIBS
- add linker option --whole-archive so that all the symbols inside static libaries will be looked through
- from linux man pages for ld (linker)
--whole-archive
For each archive mentioned on the command line after the
--whole-archive option, include every object file in the archive in
the link, rather than searching the archive for the required object
files. This is normally used to turn an archive file into a shared
library, forcing every object to be included in the resulting
shared library. This option may be used more than once.
Two notes when using this option from gcc: First, gcc doesn't know
about this option, so you have to use -Wl,-whole-archive. Second,
don't forget to use -Wl,-no-whole-archive after your list of
archives, because gcc will add its own list of archives to your
link and you may not want this flag to affect those as well.
…rom lib_wifi_com_sec.a - during linking stage, will encounter undefined reference to pmu_yield_os_check, pmu_acquire_wakelock, pmu_release_wakelock when using linker option --whole-archive on EXTRA_LIBS, because linker will looking through all the symbols - remove rtw_timer.c, rtw_wakelock.c, rtw_atomic.c from lib_wifi_com_sec.a, so that linker will use the customized rtw_timer.c, rtw_wakelock.c, rtw_atomic.c source files compiled directly at TizenRT, instead of using the definitions from lib_wifi_com_sec.a - in order to make linker prefer the rtw_timer, rtw_wakelock, rtw_atomic symbols compiled directly at TizenRT, these symbols have been changed to weak inside the wifi static libraries lib_wifi_inic_ap.a, lib_wpa_lite.a, lib_wps.a
08fa4cb to
71be477
Compare
ewoodev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rtw_timer.c, rtw_wakelock.c, rtw_atomic.c was moved out of lib_wifi_com_sec.a
|
@hk-gwak This is the PR for wifi. Please review and merge this. |
|
Why rtw_timer.c, rtw_wakelock.c, rtw_atomic.c is moved out of lib_wifi_com_sec.a? |
| @@ -1,5 +1,9 @@ | |||
| /* == "version" + "Realtek git version" + "compile date" + "compile time" == */ | |||
|
|
|||
| == version 8382ffd8 2025/11/19-17:07:47 == | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are OK
Samsung product code seems to have different build process compared to public github TizenRT, and will look through the symbols like at lib_wifi_com_sec.a, instead of the normal default gcc linker behaviour of finding the first symbol definition, and then ignore the rest of symbol definitions in other libraries. Technically, I think it is possible to have the compiled customized rtw_timer.c, rtw_wakelock.c, rtw_atomic.c inside lib_wifi_com_sec.a, and then remove the rtw_timer.c, rtw_wakelock.c, rtw_atomic.c source files in TizenRT. But leaving the source code open in github TizenRT may be helpful when using debugger on CA32. |
hk-gwak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the comment and mail.