Commit Graph

23 Commits

Author SHA1 Message Date
yury
a2a59bcb7d * android: Regenerated syscalls.
git-svn-id: trunk@40535 -
2018-12-12 13:47:40 +00:00
yury
9d7308df42 * Android: Reworked the startup code to use no assembly instructions. Generic assembler startup files contains only section data and are compiled for each CPU.
* Android: argc and argv are correct for shared libraries.

git-svn-id: trunk@39905 -
2018-10-08 16:48:41 +00:00
yury
15476898ca * Re-generated lists of android syscalls by a new script. The lists are more correct now. The script's location: https://svn.freepascal.org/svn/fpcbuild/scripts/android
git-svn-id: trunk@39749 -
2018-09-12 16:54:52 +00:00
yury
3a2884df70 * Android: The list of supported syscalls has been auto-generated directly from android sources for each CPU.
* Minor adjustments to make all compilable with the proper list of Android syscalls.

git-svn-id: trunk@39739 -
2018-09-11 16:10:50 +00:00
yury
af0fdea815 * Android: Include list of supported syscalls for each CPU.
Adjust Linux RTL to work with supported Android syscalls. 
  It should fix issues with Android 8.

git-svn-id: trunk@37480 -
2017-10-17 18:15:02 +00:00
yury
2ae3ce79bb * ARM: Never use the "BLX label" instruction. Use "BL label" instead.
The linker will always change BL to BLX if necessary, but not vice versa (linker version dependent).
  "BLX label" ALWAYS changes the instruction set. It changes a processor in ARM state to Thumb state,
  or a processor in Thumb state to ARM state.

git-svn-id: trunk@36086 -
2017-05-04 15:55:55 +00:00
yury
a0d6873331 * android: Android versions prior to 4.1 do not support recursive dlopen() calls.
Therefore if a shared library is loaded by JVM ( using dlopen() ),
          it is not possible to use dlopen() in a units initialization code -
          dlopen() simply hangs.
          To workaround this issue, if a library exports JNI_OnLoad(), then
          no unit initialization is performed during library load.
          The initialization is called when JVM has loaded the library and calls
          JNI_OnLoad().

git-svn-id: trunk@34406 -
2016-09-01 23:22:41 +00:00
yury
63813f3e96 * android: Fixed crash when using writeln during shared library finalization on Android 4.4+.
git-svn-id: trunk@32033 -
2015-10-12 22:35:51 +00:00
yury
accf3a6150 * arm-android: Use PIC in the program start-up code.
git-svn-id: trunk@32024 -
2015-10-12 08:58:19 +00:00
yury
6fc8059a1f * arm-android: Simplified _haltproc for dll.
git-svn-id: trunk@32022 -
2015-10-12 08:41:17 +00:00
yury
f9f8c931f3 * arm-android: Do not use register r4, since it must be preserved. Use r3 instead.
git-svn-id: trunk@31719 -
2015-09-16 16:28:41 +00:00
yury
30b8137994 * arm-android: PIC compatible library startup code.
git-svn-id: trunk@31682 -
2015-09-14 23:22:26 +00:00
yury
7e5af23ace * Android: There are cases when libc "environ" var may be NULL. Check for such case and provide fake valid environment. Bug #24519.
git-svn-id: trunk@24804 -
2013-06-04 15:21:29 +00:00
yury
5d061a7efa * Do not use persistent register r5 in the library init code. It fixes crash during library load on some versions of Android. Issue #23974.
* Made the startup code Thumb-safe.

git-svn-id: trunk@23694 -
2013-03-04 23:49:41 +00:00
yury
0abe1d270b * Fixed file description.
git-svn-id: branches/targetandroid@23450 -
2013-01-18 23:27:45 +00:00
yury
04fd0eeee2 * Simplify arm startup code.
git-svn-id: branches/targetandroid@23449 -
2013-01-18 23:27:02 +00:00
yury
12fe3bb65d * Removed leftover from my experiments (calling directly pascal main).
git-svn-id: branches/targetandroid@23434 -
2013-01-17 22:28:59 +00:00
yury
97dd19b04f * cprt0.as is not needed, since we link to libc always.
git-svn-id: branches/targetandroid@23286 -
2013-01-02 00:01:43 +00:00
yury
6ccb152647 * Rework of Android startup code. It is needed to always link to libc on android to implement finalization and environment variables in shared libraries.
* Cleanup of Android linker.
* Use only INSERT command in the linker script to inject custom .fpc sections. Whole linker script duplication is nor needed anymore.
* Use BFD linker, since GOLD linker does not support INSERT command. Other incompatibilities may also exist.
* Enable tf_smartlink_sections for i386-android.
* i386-android is broken after this commit. Will be fixed later.

git-svn-id: branches/targetandroid@23284 -
2013-01-01 23:49:12 +00:00
tom_at_work
75e57faba1 re-apply the changes of r22045 to correct files after recent revert
git-svn-id: branches/targetandroid@22048 -
2012-08-09 14:13:51 +00:00
tom_at_work
19238eafde - revert r22045: applied changes to wrong files, i.e. linux system files, instead of android ones
git-svn-id: branches/targetandroid@22047 -
2012-08-09 13:57:34 +00:00
tom_at_work
787ca1c0bc Made cprt0 startup files to compile. Static executables using them likely do not work though.
Removed obsolete startup files (?prt21*).

git-svn-id: branches/targetandroid@22045 -
2012-08-09 08:05:38 +00:00
tom_at_work
c520f713f4 - commit missing new files
git-svn-id: branches/targetandroid@21062 -
2012-04-26 09:41:13 +00:00