[devel] [git update] packages/glibc: heads/arm-port

Kirill A. Shutemov =?iso-8859-1?q?k=2Eshutemov_=CE=C1_velesys=2Ecom?=
Ср Авг 29 16:18:27 MSD 2007


On [Wed, 29.08.2007 15:53], Dmitry V. Levin wrote:
> On Wed, Aug 29, 2007 at 02:45:18PM +0300, Kirill A. Shutemov wrote:
> ld-2.5.so это не pie executable, а shared object.

В чём разница? До сих пор я думал, что и pie, и shared library являются
shared object. Теперь совсем запутался...

> 
> Проблема в том, что эвристика /usr/lib/rpm/fixup-libraries работает на x86*,
> но на ARM'е не распознаёт в ld-2.5.so, libc-2.5.so и libcrypt-2.5.so
> исполняемых файлов.

Действительно не работает :(

Можете что-нибудь подсказать по этому выводу?

[builder на localhost ~]$ bash -x /usr/lib/rpm/fixup-libraries /lib/ld-2.5.so 
+ for file in '"$@"'
++ file -b /lib/ld-2.5.so
+ type='ELF 32-bit LSB shared object, ARM, version 1 (SYSV), not stripped'
+ case "$type" in
++ readelf -h /lib/ld-2.5.so
+ file_header='ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2'\''s complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8a0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          104200 (bytes into file)
  Flags:                             0x4000002, has entry point, Version4 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         6
  Size of section headers:           40 (bytes)
  Number of section headers:         27
  Section header string table index: 24'
++ printf %s 'ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2'\''s complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8a0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          104200 (bytes into file)
  Flags:                             0x4000002, has entry point, Version4 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         6
  Size of section headers:           40 (bytes)
  Number of section headers:         27
  Section header string table index: 24'
++ sed -ne 's/^ \+Entry point address: \+0x0*\([0-9a-f]\+\)$/\1/p'
+ entry=8a0
+ '[' -n 8a0 ']'
++ readelf -S /lib/ld-2.5.so
+ section_header='There are 27 section headers, starting at offset 0x19708:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .hash             HASH            000000f4 0000f4 000124 04   A  3   0  4
  [ 2] .gnu.hash         GNU_HASH        00000218 000218 00014c 04   A  3   0  4
  [ 3] .dynsym           DYNSYM          00000364 000364 0001d0 10   A  4   2  4
  [ 4] .dynstr           STRTAB          00000534 000534 0001b0 00   A  0   0  1
  [ 5] .gnu.version      VERSYM          000006e4 0006e4 00003a 02   A  3   0  2
  [ 6] .gnu.version_d    VERDEF          00000720 000720 00005c 00   A  4   3  4
  [ 7] .rel.dyn          REL             0000077c 00077c 0000a0 08   A  3   0  4
  [ 8] .rel.plt          REL             0000081c 00081c 000028 08   A  3   9  4
  [ 9] .plt              PROGBITS        00000844 000844 000050 04  AX  0   0  4
  [10] .text             PROGBITS        000008a0 0008a0 0155ec 00  AX  0   0 16
  [11] __libc_freeres_fn PROGBITS        00015e8c 015e8c 000144 00  AX  0   0  4
  [12] .rodata           PROGBITS        00015fd0 015fd0 002950 00   A  0   0  4
  [13] .ARM.extab        PROGBITS        00018920 018920 000030 00   A  0   0  4
  [14] .ARM.exidx        ARM_EXIDX       00018950 018950 000068 00  AL 10   0  4
  [15] .eh_frame_hdr     PROGBITS        000189b8 0189b8 00001c 00   A  0   0  4
  [16] .eh_frame         PROGBITS        000189d4 0189d4 00007c 00   A  0   0  4
  [17] .data.rel.ro      PROGBITS        00020d50 018d50 000198 00  WA  0   0  8
  [18] .dynamic          DYNAMIC         00020ee8 018ee8 0000c8 08  WA  4   0  4
  [19] .got              PROGBITS        00020fb0 018fb0 00004c 04  WA  0   0  4
  [20] .data             PROGBITS        00021000 019000 0005f8 00  WA  0   0  8
  [21] __libc_subfreeres PROGBITS        000215f8 0195f8 000004 00  WA  0   0  4
  [22] .bss              NOBITS          000215fc 0195fc 0000e4 00  WA  0   0  4
  [23] .ARM.attributes   ARM_ATTRIBUTES  00000000 0195fc 000010 00      0   0  1
  [24] .shstrtab         STRTAB          00000000 01960c 0000f9 00      0   0  1
  [25] .symtab           SYMTAB          00000000 019b40 002cd0 10     26 690  4
  [26] .strtab           STRTAB          00000000 01c810 0014df 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)'
++ sed -ne 's/^ *\[ *[0-9]\+\] \.text \+PROGBITS \+0*\([0-9a-f]\+\) \+.*/\1/p'
++ printf %s 'There are 27 section headers, starting at offset 0x19708:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .hash             HASH            000000f4 0000f4 000124 04   A  3   0  4
  [ 2] .gnu.hash         GNU_HASH        00000218 000218 00014c 04   A  3   0  4
  [ 3] .dynsym           DYNSYM          00000364 000364 0001d0 10   A  4   2  4
  [ 4] .dynstr           STRTAB          00000534 000534 0001b0 00   A  0   0  1
  [ 5] .gnu.version      VERSYM          000006e4 0006e4 00003a 02   A  3   0  2
  [ 6] .gnu.version_d    VERDEF          00000720 000720 00005c 00   A  4   3  4
  [ 7] .rel.dyn          REL             0000077c 00077c 0000a0 08   A  3   0  4
  [ 8] .rel.plt          REL             0000081c 00081c 000028 08   A  3   9  4
  [ 9] .plt              PROGBITS        00000844 000844 000050 04  AX  0   0  4
  [10] .text             PROGBITS        000008a0 0008a0 0155ec 00  AX  0   0 16
  [11] __libc_freeres_fn PROGBITS        00015e8c 015e8c 000144 00  AX  0   0  4
  [12] .rodata           PROGBITS        00015fd0 015fd0 002950 00   A  0   0  4
  [13] .ARM.extab        PROGBITS        00018920 018920 000030 00   A  0   0  4
  [14] .ARM.exidx        ARM_EXIDX       00018950 018950 000068 00  AL 10   0  4
  [15] .eh_frame_hdr     PROGBITS        000189b8 0189b8 00001c 00   A  0   0  4
  [16] .eh_frame         PROGBITS        000189d4 0189d4 00007c 00   A  0   0  4
  [17] .data.rel.ro      PROGBITS        00020d50 018d50 000198 00  WA  0   0  8
  [18] .dynamic          DYNAMIC         00020ee8 018ee8 0000c8 08  WA  4   0  4
  [19] .got              PROGBITS        00020fb0 018fb0 00004c 04  WA  0   0  4
  [20] .data             PROGBITS        00021000 019000 0005f8 00  WA  0   0  8
  [21] __libc_subfreeres PROGBITS        000215f8 0195f8 000004 00  WA  0   0  4
  [22] .bss              NOBITS          000215fc 0195fc 0000e4 00  WA  0   0  4
  [23] .ARM.attributes   ARM_ATTRIBUTES  00000000 0195fc 000010 00      0   0  1
  [24] .shstrtab         STRTAB          00000000 01960c 0000f9 00      0   0  1
  [25] .symtab           SYMTAB          00000000 019b40 002cd0 10     26 690  4
  [26] .strtab           STRTAB          00000000 01c810 0014df 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)'
+ text=8a0
+ '[' -n 8a0 ']'
+ '[' 8a0 = 8a0 ']'
+ readelf -s /lib/ld-2.5.so
+ fgrep -wqs __preinit_array_end
+ '[' -n /lib/ld-2.5.so ']'
+ chmod -v u+w,a-x,ug-s /lib/ld-2.5.so
/bin/chmod: changing permissions of `/lib/ld-2.5.so': Operation not permitted
failed to change mode of `/lib/ld-2.5.so' to 0644 (rw-r--r--)


-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + Velesys LLC, http://www.velesys.com/
 + ALT Linux Team, http://www.altlinux.com/
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: Digital signature
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20070829/e535df38/attachment-0001.bin>


Подробная информация о списке рассылки Devel