Closed
Bug 720621
Opened 13 years ago
Closed 13 years ago
Crashes with "Text relocation are not supported" when built with NDK >= r6b
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 13
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file, 4 obsolete files)
4.40 KB,
patch
|
Details | Diff | Splinter Review |
The reason this happens is
http://code.google.com/p/android/issues/detail?id=23203
There are three possible ways to fix/workaround this:
- detect the problem in configure, and disable the new linker. Easy fix, but not future proof (the old linker will have to go eventually).
- detect the problem in configure, and hack around it. Might be tricky, but would allow to still use the new linker.
- Allow the new linker to handle text relocations. I have mixed feelings about this. This is going to be difficult to implement with bug 686805, and in general, text relocations add to startup time, and we should avoid them. They're also very easy to sneak in, and actually having the linker fail when there are make them very noticeable.
I'd go for option 2.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #597720 -
Flags: review?(ted.mielczarek)
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #597722 -
Flags: review?(ted.mielczarek)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mh+mozilla
Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 597722 [details] [diff] [review]
Avoid text relocations induced by NDK >= r6b - nspr part
I'm going to avoid modifying nspr.
Attachment #597722 -
Attachment is obsolete: true
Attachment #597722 -
Flags: review?(ted.mielczarek)
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #597877 -
Flags: review?(ted.mielczarek)
Assignee | ||
Updated•13 years ago
|
Attachment #597720 -
Attachment is obsolete: true
Attachment #597720 -
Flags: review?(ted.mielczarek)
Comment 5•13 years ago
|
||
Comment on attachment 597877 [details] [diff] [review]
Avoid text relocations induced by NDK >= r6b
Review of attachment 597877 [details] [diff] [review]:
-----------------------------------------------------------------
::: configure.in
@@ +4112,5 @@
> +dnl safe not to link crtbegin. Besides, previous versions of the NDK didn't
> +dnl link crtbegin and crtend at all.
> +if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$OS_TARGET" = "Android"; then
> + AC_CACHE_CHECK([whether the CRT objects have text relocations],
> + CRT_HAS_TEXT_RELOCATIONS,
It's normal to use an ac_cv_foo-style variable for these.
Attachment #597877 -
Flags: review?(ted.mielczarek) → review+
Comment 6•13 years ago
|
||
this patch seems to break the x86 android build. With it I get in the config.log:
configure:12569: /home/blassey/android-ndk-r6b/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-android-linux-gcc -o conftest.so -shared -Wl,-z,defs -mandroid -L/home/blassey/android-ndk-r6b/platforms/android-9/arch-x86/usr/lib -Wl,-rpath-link=/home/blassey/android-ndk-r6b/platforms/android-9/arch-x86/usr/lib --sysroot=/home/blassey/android-ndk-r6b/platforms/android-9/arch-x86 -llog -Wl,--allow-shlib-undefined -L/home/blassey/android-ndk-r6b/sources/cxx-stl/stlport/libs/x86/ conftest.C -lstlport_static 1>&2
/tmp/ccUYlM6L.o:(.data.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
and this from configure:
checking whether the CRT objects have text relocations... configure: error: couldn't compile a simple C file
Assignee | ||
Comment 7•13 years ago
|
||
Brad, can you try this?
Assignee | ||
Updated•13 years ago
|
Attachment #597877 -
Attachment is obsolete: true
Assignee | ||
Comment 8•13 years ago
|
||
This version works on both x86 and arm.
Assignee | ||
Updated•13 years ago
|
Attachment #598153 -
Attachment is obsolete: true
Assignee | ||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•