The issue here is that the linker binary crated with the gcc-i686-linux-
android toolchain contains a .plt section, when it shouldn't.

The consequence is that once you execute a binary that depends on any
shared library, the linker will fail when it tries to initialize itself,
because it can't contain any .plt section (and in our case it fails when
looking for the gdb hook rtld_db_dlactivity).

If you compare the linker binary with the one created using the pre-
built android toolchain, you can easily see that the elf file doesn't
contain the .plt section, not causing any issue.

Pre-build:
root@ubuntu-phablet:/# objdump -x /system/bin/linker 
...
Dynamic Section:
  PLTGOT               0x0001ffe4
  REL                  0x00000224
  RELSZ                0x00000778
  RELENT               0x00000008
  RELCOUNT             0x000000ef
  SYMTAB               0x00000114
  SYMENT               0x00000010
  STRTAB               0x000001a4
  STRSZ                0x00000047
  HASH                 0x000001ec
  INIT_ARRAY           0x0001ff00
  INIT_ARRAYSZ         0x00000004
  SYMBOLIC             0x00000000
  FLAGS                0x0000000a
  FLAGS_1              0x00000001

gcc-i686-linux-android:
root@ubuntu-phablet:/# objdump -x /system/bin/linker 
...
Dynamic Section:
  PLTGOT               0x0001ffd4
  PLTRELSZ             0x00000028
  JMPREL               0x0000099c
  PLTREL               0x00000011
  REL                  0x00000224
  RELSZ                0x00000778
  RELENT               0x00000008
  RELCOUNT             0x000000ee
  SYMTAB               0x00000114
  SYMENT               0x00000010
  STRTAB               0x000001a4
  STRSZ                0x00000047
  HASH                 0x000001ec
  INIT_ARRAY           0x0001fee0
  INIT_ARRAYSZ         0x00000004
  FLAGS                0x00000008
  FLAGS_1              0x00000001

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1305315

Title:
  Android container fails to start when built with the gcc-i686-linux-
  android toolchain

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android/+bug/1305315/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to