ALT Linux Team development discussions
 help / color / mirror / Atom feed
* Re: [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1
  @ 2009-12-17 21:52 ` Alexey Tourbin
  2009-12-17 21:59   ` Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-17 21:52 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]

On Fri, Dec 18, 2009 at 12:16:24AM +0300, Girar Builder robot wrote:
> http://git.altlinux.org/tasks/17565/task/log
> 
> 2009-Dec-17 22:25:01 :: task #17565 for 5.1 started:
> #1 build 3.5-alt0.M51.1 from /people/real/packages/cgal.git
> 2009-Dec-17 22:25:16 :: created pkg.tar for cgal.git tag 3.5-alt0.M51.1
> 2009-Dec-17 22:25:17 :: [i586] cgal.git 3.5-alt0.M51.1: build start
> 2009-Dec-17 22:25:17 :: [x86_64] cgal.git 3.5-alt0.M51.1: build start
> 2009-Dec-18 00:11:04 :: [x86_64] cgal.git 3.5-alt0.M51.1: build OK
> 2009-Dec-18 00:13:03 :: [i586] cgal.git 3.5-alt0.M51.1: build OK
> 2009-Dec-18 00:13:16 :: build check OK
> 2009-Dec-18 00:13:17 :: plan OK
> 2009-Dec-18 00:13:18 :: version check OK
> 2009-Dec-18 00:15:20 :: created test repo
> 2009-Dec-18 00:16:17 :: dependencies check OK
> /tmp/.private/brain/gb-repo-5.1/i586/RPMS.classic/libcgal-3.5-alt0.M51.1.i586.rpm: /usr/lib/libCGAL_ImageIO.so.4.0.0: invalid nm output: 00029228 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> /tmp/.private/brain/gb-repo-5.1/x86_64/RPMS.classic/libcgal-3.5-alt0.M51.1.x86_64.rpm: /usr/lib64/libCGAL_ImageIO.so.4.0.0: invalid nm output: 000000000022b440 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> 2009-Dec-18 00:16:24 :: task #17565 for 5.1 FAILED

$ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm nm -D ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |grep -C1 b440  
000000000022b440 B 
000000000022b448 B BitOffset
$ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm readelf -aW ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |grep -C1 b440
000000000022af78  0000008a00000006 R_X86_64_GLOB_DAT      000000000001eb70 _Z13readGisHeaderPKcP11point_image + 0
000000000022af80  000000e300000006 R_X86_64_GLOB_DAT      000000000022b440  + 0
000000000022af88  000000ec00000006 R_X86_64_GLOB_DAT      000000000022b430 r + 0
--
   226: 0000000000007480    11 FUNC    GLOBAL DEFAULT   11 _Z15Recline_verbosev
   227: 000000000022b440     8 OBJECT  GLOBAL DEFAULT   25 
   228: 0000000000006330   133 FUNC    GLOBAL DEFAULT   11 _Z17Convert_r32_to_s8PfPci
$ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm objdump -T ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |grep -C1 b440
0000000000007480 g    DF .text  000000000000000b  Base        _Z15Recline_verbosev
000000000022b440 g    DO .bss   0000000000000008  Base        
0000000000006330 g    DF .text  0000000000000085  Base        _Z17Convert_r32_to_s8PfPci
$ 

Check it out, Beavis!

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1
  2009-12-17 21:52 ` [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1 Alexey Tourbin
@ 2009-12-17 21:59   ` Alexey Tourbin
  2009-12-17 22:44     ` Dmitry V. Levin
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-17 21:59 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]

On Fri, Dec 18, 2009 at 12:52:38AM +0300, Alexey Tourbin wrote:
> On Fri, Dec 18, 2009 at 12:16:24AM +0300, Girar Builder robot wrote:
> > http://git.altlinux.org/tasks/17565/task/log
> > 

> > /tmp/.private/brain/gb-repo-5.1/i586/RPMS.classic/libcgal-3.5-alt0.M51.1.i586.rpm: /usr/lib/libCGAL_ImageIO.so.4.0.0: invalid nm output: 00029228 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> > /tmp/.private/brain/gb-repo-5.1/x86_64/RPMS.classic/libcgal-3.5-alt0.M51.1.x86_64.rpm: /usr/lib64/libCGAL_ImageIO.so.4.0.0: invalid nm output: 000000000022b440 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> > 2009-Dec-18 00:16:24 :: task #17565 for 5.1 FAILED

> $ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm nm -D ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |grep -C1 b440  
> 000000000022b440 B 
> 000000000022b448 B BitOffset

$ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm eu-elflint ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |head
section [ 2] '.gnu.hash': hash value for symbol 227 in chain for bucket 316 wrong
section [ 2] '.gnu.hash': bitmask does not match names in the hash table
section [ 8] '.rela.plt': relocation 0: offset out of bounds
section [ 8] '.rela.plt': relocation 1: offset out of bounds
section [ 8] '.rela.plt': relocation 2: offset out of bounds
section [ 8] '.rela.plt': relocation 3: offset out of bounds
section [ 8] '.rela.plt': relocation 4: offset out of bounds
section [ 8] '.rela.plt': relocation 5: offset out of bounds
section [ 8] '.rela.plt': relocation 6: offset out of bounds
section [ 8] '.rela.plt': relocation 7: offset out of bounds
$ rpmpeek /ALT/Sisyphus/files/x86_64/RPMS/libcgal-3.5-alt1.x86_64.rpm eu-elflint ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |head
section [ 8] '.rela.plt': relocation 0: offset out of bounds                          
section [ 8] '.rela.plt': relocation 1: offset out of bounds
section [ 8] '.rela.plt': relocation 2: offset out of bounds
section [ 8] '.rela.plt': relocation 3: offset out of bounds
section [ 8] '.rela.plt': relocation 4: offset out of bounds
section [ 8] '.rela.plt': relocation 5: offset out of bounds
section [ 8] '.rela.plt': relocation 6: offset out of bounds
section [ 8] '.rela.plt': relocation 7: offset out of bounds
section [ 8] '.rela.plt': relocation 8: offset out of bounds
section [ 8] '.rela.plt': relocation 9: offset out of bounds
$ 

> Check it out, Beavis!

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1
  2009-12-17 21:59   ` Alexey Tourbin
@ 2009-12-17 22:44     ` Dmitry V. Levin
  2009-12-18  0:05       ` Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-17 22:44 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 3253 bytes --]

On Fri, Dec 18, 2009 at 12:59:21AM +0300, Alexey Tourbin wrote:
> On Fri, Dec 18, 2009 at 12:52:38AM +0300, Alexey Tourbin wrote:
> > On Fri, Dec 18, 2009 at 12:16:24AM +0300, Girar Builder robot wrote:
> > > http://git.altlinux.org/tasks/17565/task/log
> > > 
> 
> > > /tmp/.private/brain/gb-repo-5.1/i586/RPMS.classic/libcgal-3.5-alt0.M51.1.i586.rpm: /usr/lib/libCGAL_ImageIO.so.4.0.0: invalid nm output: 00029228 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> > > /tmp/.private/brain/gb-repo-5.1/x86_64/RPMS.classic/libcgal-3.5-alt0.M51.1.x86_64.rpm: /usr/lib64/libCGAL_ImageIO.so.4.0.0: invalid nm output: 000000000022b440 B  at /usr/lib/perl5/vendor_perl/qa/rpmelfsym.pm line 61, <$fh> line 1.
> > > 2009-Dec-18 00:16:24 :: task #17565 for 5.1 FAILED
> 
> > $ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm nm -D ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |grep -C1 b440  
> > 000000000022b440 B 
> > 000000000022b448 B BitOffset
> 
> $ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm eu-elflint ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |head
> section [ 2] '.gnu.hash': hash value for symbol 227 in chain for bucket 316 wrong
> section [ 2] '.gnu.hash': bitmask does not match names in the hash table
> section [ 8] '.rela.plt': relocation 0: offset out of bounds
> section [ 8] '.rela.plt': relocation 1: offset out of bounds
> section [ 8] '.rela.plt': relocation 2: offset out of bounds
> section [ 8] '.rela.plt': relocation 3: offset out of bounds
> section [ 8] '.rela.plt': relocation 4: offset out of bounds
> section [ 8] '.rela.plt': relocation 5: offset out of bounds
> section [ 8] '.rela.plt': relocation 6: offset out of bounds
> section [ 8] '.rela.plt': relocation 7: offset out of bounds

$ GET http://git.altlinux.org/tasks/17565/build/1/i586/log |fgrep libCGAL_ImageIO |head -6
Linking CXX shared library ../../lib/libCGAL_ImageIO.so
-- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4.0.0
-- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4
-- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so
-- Removed runtime path from "/usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4.0.0"
mode of `./usr/lib/libCGAL_ImageIO.so.4.0.0' changed to 0644 (rw-r--r--)

The build log isn't quite informative, is it?

> $ rpmpeek /ALT/Sisyphus/files/x86_64/RPMS/libcgal-3.5-alt1.x86_64.rpm eu-elflint ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |head
> section [ 8] '.rela.plt': relocation 0: offset out of bounds                          
> section [ 8] '.rela.plt': relocation 1: offset out of bounds
> section [ 8] '.rela.plt': relocation 2: offset out of bounds
> section [ 8] '.rela.plt': relocation 3: offset out of bounds
> section [ 8] '.rela.plt': relocation 4: offset out of bounds
> section [ 8] '.rela.plt': relocation 5: offset out of bounds
> section [ 8] '.rela.plt': relocation 6: offset out of bounds
> section [ 8] '.rela.plt': relocation 7: offset out of bounds
> section [ 8] '.rela.plt': relocation 8: offset out of bounds
> section [ 8] '.rela.plt': relocation 9: offset out of bounds
> $ 
> 
> > Check it out, Beavis!

Well, binutils and gcc versions differ in 5.1 and Sisyphus, that's clear.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1
  2009-12-17 22:44     ` Dmitry V. Levin
@ 2009-12-18  0:05       ` Alexey Tourbin
  2009-12-18  0:59         ` [devel] elflint Alexey Tourbin
                           ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-18  0:05 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 2416 bytes --]

On Fri, Dec 18, 2009 at 01:44:29AM +0300, Dmitry V. Levin wrote:
> $ GET http://git.altlinux.org/tasks/17565/build/1/i586/log |fgrep libCGAL_ImageIO |head -6
> Linking CXX shared library ../../lib/libCGAL_ImageIO.so
> -- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4.0.0
> -- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4
> -- Installing: /usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so
> -- Removed runtime path from "/usr/src/tmp/cgal-buildroot/usr/lib/libCGAL_ImageIO.so.4.0.0"
> mode of `./usr/lib/libCGAL_ImageIO.so.4.0.0' changed to 0644 (rw-r--r--)
> 
> The build log isn't quite informative, is it?

Yeah! It really sucks!

> > $ rpmpeek /ALT/Sisyphus/files/x86_64/RPMS/libcgal-3.5-alt1.x86_64.rpm eu-elflint ./usr/lib64/libCGAL_ImageIO.so.4.0.0 |head
> > section [ 8] '.rela.plt': relocation 0: offset out of bounds                          
> > section [ 8] '.rela.plt': relocation 1: offset out of bounds
> > section [ 8] '.rela.plt': relocation 2: offset out of bounds
> > section [ 8] '.rela.plt': relocation 3: offset out of bounds
> > section [ 8] '.rela.plt': relocation 4: offset out of bounds
> > section [ 8] '.rela.plt': relocation 5: offset out of bounds
> > section [ 8] '.rela.plt': relocation 6: offset out of bounds
> > section [ 8] '.rela.plt': relocation 7: offset out of bounds
> > section [ 8] '.rela.plt': relocation 8: offset out of bounds
> > section [ 8] '.rela.plt': relocation 9: offset out of bounds
> > $ 
> > 
> > > Check it out, Beavis!
> 
> Well, binutils and gcc versions differ in 5.1 and Sisyphus, that's clear.

Actually I think maybe we should integrate eu-elflint into
/usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
at binutils semi-bugs, and otherwise it's useful.

$ rpmpeek libcgal-3.5-alt0.M51.1.x86_64.rpm eu-elflint --gnu-ld ./usr/lib64/libCGAL_ImageIO.so.4.0.0      
section [ 2] '.gnu.hash': hash value for symbol 227 in chain for bucket 316 wrong                                    
section [ 2] '.gnu.hash': bitmask does not match names in the hash table
$ rpmpeek /ALT/Sisyphus/files/x86_64/RPMS/libcgal-3.5-alt1.x86_64.rpm eu-elflint --gnu-ld ./usr/lib64/libCGAL_ImageIO.so.4.0.0                                                                                                                   
No errors
$ 

From what I see it's a malformed ELF.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [devel] elflint
  2009-12-18  0:05       ` Alexey Tourbin
@ 2009-12-18  0:59         ` Alexey Tourbin
  2009-12-18  3:21           ` Dmitry V. Levin
  2009-12-18  2:23         ` [devel] eu-elflint Dmitry V. Levin
  2009-12-19  0:26         ` [devel] verify-elf lint=normal (elflint) Alexey Tourbin
  2 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-18  0:59 UTC (permalink / raw)
  To: ALT Devel discussion list


[-- Attachment #1.1: Type: text/plain, Size: 473 bytes --]

On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> Actually I think maybe we should integrate eu-elflint into
> /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> at binutils semi-bugs, and otherwise it's useful.

Here are some findings (elflint executed on my host system).

find / /usr -xdev -type f -exec file -NF$'\t' '{}' '+' 2>/dev/null |
awk -F'\t' '$2~/\<ELF /{print$1}' |
xargs eu-elflint --gnu-ld |
awk 'BEGIN{RS="\n\n"}!/No errors/'

[-- Attachment #1.2: elflint.txt.gz --]
[-- Type: application/x-gzip, Size: 12149 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] eu-elflint
  2009-12-18  0:05       ` Alexey Tourbin
  2009-12-18  0:59         ` [devel] elflint Alexey Tourbin
@ 2009-12-18  2:23         ` Dmitry V. Levin
  2009-12-18  2:49           ` Alexey Tourbin
  2009-12-19  0:26         ` [devel] verify-elf lint=normal (elflint) Alexey Tourbin
  2 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-18  2:23 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
[...]
> Actually I think maybe we should integrate eu-elflint into
> /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> at binutils semi-bugs, and otherwise it's useful.

It needs /proc to work due to $ORIGIN thing it uses:

with-proc$ ltrace -s64 -e dlopen eu-elflint --quiet --gnu-ld /bin/true 
dlopen("$ORIGIN/../$LIB/elfutils/libebl_x86_64.so", 1) = 0x1227d810
+++ exited (status 0) +++

without-proc$ strace -eopen eu-elflint --quiet --gnu-ld /bin/pwd
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/usr/lib64/libelf.so.1", O_RDONLY) = 3
open("/lib64/libdl.so.2", O_RDONLY)     = 3
open("/lib64/libc.so.6", O_RDONLY)      = 3
open("/bin/pwd", O_RDONLY)              = 3
open("/etc/ld.so.cache", O_RDONLY)      = 4
open("/lib64/tls/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
section [ 9] '.rela.dyn': relocation 0: invalid type
[...]
section [10] '.rela.plt': relocation 50: invalid type


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] eu-elflint
  2009-12-18  2:23         ` [devel] eu-elflint Dmitry V. Levin
@ 2009-12-18  2:49           ` Alexey Tourbin
  0 siblings, 0 replies; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-18  2:49 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

On Fri, Dec 18, 2009 at 05:23:20AM +0300, Dmitry V. Levin wrote:
> On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > Actually I think maybe we should integrate eu-elflint into
> > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > at binutils semi-bugs, and otherwise it's useful.
> 
> It needs /proc to work due to $ORIGIN thing it uses:
> 
> with-proc$ ltrace -s64 -e dlopen eu-elflint --quiet --gnu-ld /bin/true 
> dlopen("$ORIGIN/../$LIB/elfutils/libebl_x86_64.so", 1) = 0x1227d810
> +++ exited (status 0) +++
> 
> without-proc$ strace -eopen eu-elflint --quiet --gnu-ld /bin/pwd
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/usr/lib64/libelf.so.1", O_RDONLY) = 3
> open("/lib64/libdl.so.2", O_RDONLY)     = 3
> open("/lib64/libc.so.6", O_RDONLY)      = 3
> open("/bin/pwd", O_RDONLY)              = 3
> open("/etc/ld.so.cache", O_RDONLY)      = 4
> open("/lib64/tls/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/lib64/tls/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/lib64/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/lib64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/usr/lib64/tls/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/usr/lib64/tls/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/usr/lib64/x86_64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/usr/lib64/libebl_x86_64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
> section [ 9] '.rela.dyn': relocation 0: invalid type
> [...]
> section [10] '.rela.plt': relocation 50: invalid type

We can use something like
verify-elf: LD_LIBRARY_PATH=@LIBDIR@/elfutils eu-elflint...
rpm.spec: Requires: %_libdir/elfutils

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] elflint
  2009-12-18  0:59         ` [devel] elflint Alexey Tourbin
@ 2009-12-18  3:21           ` Dmitry V. Levin
  2009-12-18 17:27             ` Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-18  3:21 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 7627 bytes --]

On Fri, Dec 18, 2009 at 03:59:28AM +0300, Alexey Tourbin wrote:
> Here are some findings (elflint executed on my host system).
> 
> find / /usr -xdev -type f -exec file -NF$'\t' '{}' '+' 2>/dev/null |
> awk -F'\t' '$2~/\<ELF /{print$1}' |
> xargs eu-elflint --gnu-ld |
> awk 'BEGIN{RS="\n\n"}!/No errors/'
[...]
> /usr/lib64/Mcrt1.o:
> section [ 4] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/crti.o:
> section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/libc_stubs.a:
> section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/crtn.o:
> section [ 6] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/libmcheck.a:
> section [ 7] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/Scrt1.o:
> section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/crt1.o:
> section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/libnvidianull.so:
> section [ 6] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcrt1.o:
> section [10] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/tstMicroGC.gc:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VMMGC.gc:
> section [16] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VBoxDDR0.r0:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VBoxDD2GC.gc:
> section [10] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VBoxDD2R0.r0:
> section [10] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VBoxDDGC.gc:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/virtualbox/VMMR0.r0:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/python2.6/config/python.o:
> section [ 5] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtfastmath.o:
> section [14] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtendS.o:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtbeginS.o:
> section [14] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtend.o:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtprec64.o:
> section [15] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtbeginT.o:
> section [14] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtprec32.o:
> section [15] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtbegin.o:
> section [13] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/gcc/x86_64-alt-linux/4.4.2/crtprec80.o:
> section [15] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libpthread-2.10.1.so:
> section [33] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libcidn-2.10.1.so:
> section [28] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libanl-2.10.1.so:
> section [30] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libnss_files-2.10.1.so:
> section [28] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libdl-2.10.1.so:
> section [29] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libBrokenLocale-2.10.1.so:
> section [27] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libthread_db-1.0.so:
> section [29] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libutil-2.10.1.so:
> section [28] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libm-2.10.1.so:
> section [29] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libcrypt-2.10.1.so:
> section [29] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/librt-2.10.1.so:
> section [32] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/ld-2.10.1.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libresolv-2.10.1.so:
> section [29] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libnsl-2.10.1.so:
> section [28] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/debug/libc-2.10.1.so:
> section [69] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/libieee.a:
> section [ 4] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/klibc/lib/libc.so:
> section [ 5] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_exp-ptrcheck-amd64-linux.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_helgrind-amd64-linux.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_drd-amd64-linux.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_core-amd64-linux.so:
> section [21] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/lib64/valgrind/vgpreload_massif-amd64-linux.so:
> section [22] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/libexec/X11/drv.d/nvidia:
> section [26] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/libexec/X11/drvpre.d/nvidia:
> section [26] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-skels.o:
> section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-stubs.o:
> section [ 5] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-imodule.o:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-common.o:
> section [11] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/c-impl.o:
> section [10] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/cTestCall.so:
> section [25] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/TestCall_module.so:
> section [24] '.comment' has wrong flags: expected none, is MERGE|STRINGS

This part of diagnostics is wrong, .comment could be MERGE|STRINGS, so
I've just submitted elfutils-0.143-alt1 with a fix.

Said that, I admit some of these files could be stripped better.
But that's another story.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] elflint
  2009-12-18  3:21           ` Dmitry V. Levin
@ 2009-12-18 17:27             ` Alexey Tourbin
  2009-12-18 17:44               ` Dmitry V. Levin
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-18 17:27 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Fri, Dec 18, 2009 at 06:21:40AM +0300, Dmitry V. Levin wrote:
> On Fri, Dec 18, 2009 at 03:59:28AM +0300, Alexey Tourbin wrote:
> > /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-skels.o:
> > section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> > /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-stubs.o:
> > section [ 5] '.comment' has wrong flags: expected none, is MERGE|STRINGS

Why VERIFY_ELF_FHS didn't work here?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] elflint
  2009-12-18 17:27             ` Alexey Tourbin
@ 2009-12-18 17:44               ` Dmitry V. Levin
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-18 17:44 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

On Fri, Dec 18, 2009 at 08:27:32PM +0300, Alexey Tourbin wrote:
> On Fri, Dec 18, 2009 at 06:21:40AM +0300, Dmitry V. Levin wrote:
> > On Fri, Dec 18, 2009 at 03:59:28AM +0300, Alexey Tourbin wrote:
> > > /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-skels.o:
> > > section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> > > /usr/share/doc/python-module-pyorbit-2.24.0/tests/c-inproc/.libs/testcall-stubs.o:
> > > section [ 5] '.comment' has wrong flags: expected none, is MERGE|STRINGS
> 
> Why VERIFY_ELF_FHS didn't work here?

Maybe files installed by %doc bypass all post-%install checks?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [devel] verify-elf lint=normal (elflint)
  2009-12-18  0:05       ` Alexey Tourbin
  2009-12-18  0:59         ` [devel] elflint Alexey Tourbin
  2009-12-18  2:23         ` [devel] eu-elflint Dmitry V. Levin
@ 2009-12-19  0:26         ` Alexey Tourbin
  2009-12-19 19:50           ` Dmitry V. Levin
  2009-12-21  8:47           ` Anton V. Boyarshinov
  2 siblings, 2 replies; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-19  0:26 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> Actually I think maybe we should integrate eu-elflint into
> /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> at binutils semi-bugs, and otherwise it's useful.

So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
as well?  On one hand, some packages won't build.  But on the other,
I believe that verify-elf is important (e.g. more important than verify-info).

http://git.altlinux.org/people/at/packages/rpm.git?a=shortlog;h=refs/heads/elflint

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19  0:26         ` [devel] verify-elf lint=normal (elflint) Alexey Tourbin
@ 2009-12-19 19:50           ` Dmitry V. Levin
  2009-12-19 21:03             ` Alexey Tourbin
  2009-12-21  8:47           ` Anton V. Boyarshinov
  1 sibling, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-19 19:50 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

On Sat, Dec 19, 2009 at 03:26:40AM +0300, Alexey Tourbin wrote:
> On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > Actually I think maybe we should integrate eu-elflint into
> > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > at binutils semi-bugs, and otherwise it's useful.
> 
> So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> as well?

Let's check whether eu-elflint has yet more false positives to be fixed.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19 19:50           ` Dmitry V. Levin
@ 2009-12-19 21:03             ` Alexey Tourbin
  2009-12-19 21:42               ` Dmitry V. Levin
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-19 21:03 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Sat, Dec 19, 2009 at 10:50:07PM +0300, Dmitry V. Levin wrote:
> On Sat, Dec 19, 2009 at 03:26:40AM +0300, Alexey Tourbin wrote:
> > On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > > Actually I think maybe we should integrate eu-elflint into
> > > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > > at binutils semi-bugs, and otherwise it's useful.
> > 
> > So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> > to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> > as well?
> 
> Let's check whether eu-elflint has yet more false positives to be fixed.

How do we check?  Checking the existing (pre-compiled) packages is
useless, since most of them are compiled with older toolchain (and
most of the lint warnings will go away as packages are recompiled).

Okay, probably I'm going to release 4.0.4-alt98.25 anyway.
Also, I'm going to bump alt99.M51 and alt100 some time later.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19 21:03             ` Alexey Tourbin
@ 2009-12-19 21:42               ` Dmitry V. Levin
  2009-12-19 23:57                 ` Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-19 21:42 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

On Sun, Dec 20, 2009 at 12:03:49AM +0300, Alexey Tourbin wrote:
> On Sat, Dec 19, 2009 at 10:50:07PM +0300, Dmitry V. Levin wrote:
> > On Sat, Dec 19, 2009 at 03:26:40AM +0300, Alexey Tourbin wrote:
> > > On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > > > Actually I think maybe we should integrate eu-elflint into
> > > > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > > > at binutils semi-bugs, and otherwise it's useful.
> > > 
> > > So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> > > to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> > > as well?
> > 
> > Let's check whether eu-elflint has yet more false positives to be fixed.
> 
> How do we check?  Checking the existing (pre-compiled) packages is
> useless, since most of them are compiled with older toolchain (and
> most of the lint warnings will go away as packages are recompiled).

For example, we could introduce this new check as "relaxed" and run
a test rebuild.

> Okay, probably I'm going to release 4.0.4-alt98.25 anyway.

Next test rebuild is going to start now, but I can delay it to get new
rpmbuild packaged first.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19 21:42               ` Dmitry V. Levin
@ 2009-12-19 23:57                 ` Alexey Tourbin
  2009-12-20  2:37                   ` Alexey Tourbin
  2009-12-21 20:08                   ` [devel] verify-elf lint=normal (elflint) Dmitry V. Levin
  0 siblings, 2 replies; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-19 23:57 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

On Sun, Dec 20, 2009 at 12:42:19AM +0300, Dmitry V. Levin wrote:
> On Sun, Dec 20, 2009 at 12:03:49AM +0300, Alexey Tourbin wrote:
> > On Sat, Dec 19, 2009 at 10:50:07PM +0300, Dmitry V. Levin wrote:
> > > On Sat, Dec 19, 2009 at 03:26:40AM +0300, Alexey Tourbin wrote:
> > > > So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> > > > to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> > > > as well?
> > > 
> > > Let's check whether eu-elflint has yet more false positives to be fixed.
> > 
> > How do we check?  Checking the existing (pre-compiled) packages is
> > useless, since most of them are compiled with older toolchain (and
> > most of the lint warnings will go away as packages are recompiled).
> 
> For example, we could introduce this new check as "relaxed" and run
> a test rebuild.
> 
> > Okay, probably I'm going to release 4.0.4-alt98.25 anyway.
> 
> Next test rebuild is going to start now, but I can delay it to get new
> rpmbuild packaged first.

4.0.4-alt98.25 with lint=relaxed is in sisyphus.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19 23:57                 ` Alexey Tourbin
@ 2009-12-20  2:37                   ` Alexey Tourbin
  2009-12-21  6:06                     ` REAL
  2009-12-21 20:08                   ` [devel] verify-elf lint=normal (elflint) Dmitry V. Levin
  1 sibling, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-20  2:37 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

On Sun, Dec 20, 2009 at 02:57:38AM +0300, Alexey Tourbin wrote:
> > Next test rebuild is going to start now, but I can delay it to get new
> > rpmbuild packaged first.
> 
> 4.0.4-alt98.25 with lint=relaxed is in sisyphus.

And it turns out to be buggy.  Due to a typo, it is
lint=normal,fhs=relaxed rather than lint=relaxed.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21  6:06                     ` REAL
@ 2009-12-21  6:02                       ` Alexey Tourbin
  2009-12-21  6:25                         ` REAL
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-21  6:02 UTC (permalink / raw)
  To: ALT Linux Team development discussions

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

On Mon, Dec 21, 2009 at 01:06:16PM +0700, REAL wrote:
> Alexey Tourbin пишет:
> >On Sun, Dec 20, 2009 at 02:57:38AM +0300, Alexey Tourbin wrote:
> >>>Next test rebuild is going to start now, but I can delay it to get new
> >>>rpmbuild packaged first.
> >>4.0.4-alt98.25 with lint=relaxed is in sisyphus.
> >
> >And it turns out to be buggy.  Due to a typo, it is
> >lint=normal,fhs=relaxed rather than lint=relaxed.
> 
> lint=normal,fhs=relaxed:
> http://git.altlinux.org/tasks/17565/task/log.4
> 
> lint=relaxed:
> http://git.altlinux.org/tasks/17565/task/log.5

Please understand that
1) 4.0.4-alt98.25+ is about sisyphus, and you are trying to build
for branch 5.1.
2) elflint will not help you to build the package.
It is only to diagnose malformed binaries.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-20  2:37                   ` Alexey Tourbin
@ 2009-12-21  6:06                     ` REAL
  2009-12-21  6:02                       ` Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: REAL @ 2009-12-21  6:06 UTC (permalink / raw)
  To: ALT Linux Team development discussions

Alexey Tourbin пишет:
> On Sun, Dec 20, 2009 at 02:57:38AM +0300, Alexey Tourbin wrote:
>>> Next test rebuild is going to start now, but I can delay it to get new
>>> rpmbuild packaged first.
>> 4.0.4-alt98.25 with lint=relaxed is in sisyphus.
> 
> And it turns out to be buggy.  Due to a typo, it is
> lint=normal,fhs=relaxed rather than lint=relaxed.

lint=normal,fhs=relaxed:
http://git.altlinux.org/tasks/17565/task/log.4

lint=relaxed:
http://git.altlinux.org/tasks/17565/task/log.5

-- 

REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21  6:02                       ` Alexey Tourbin
@ 2009-12-21  6:25                         ` REAL
  2009-12-21 18:06                           ` [devel] [SOLVED] " Alexey Tourbin
  0 siblings, 1 reply; 28+ messages in thread
From: REAL @ 2009-12-21  6:25 UTC (permalink / raw)
  To: ALT Linux Team development discussions

Alexey Tourbin пишет:
>> http://git.altlinux.org/tasks/17565/task/log.5
> 
> Please understand that
> 1) 4.0.4-alt98.25+ is about sisyphus, and you are trying to build
> for branch 5.1.
> 2) elflint will not help you to build the package.
> It is only to diagnose malformed binaries.

But what shall I do to build CGAL for branch 5.1?

-- 

REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19  0:26         ` [devel] verify-elf lint=normal (elflint) Alexey Tourbin
  2009-12-19 19:50           ` Dmitry V. Levin
@ 2009-12-21  8:47           ` Anton V. Boyarshinov
  2009-12-21 10:55             ` Anton V. Boyarshinov
  1 sibling, 1 reply; 28+ messages in thread
From: Anton V. Boyarshinov @ 2009-12-21  8:47 UTC (permalink / raw)
  To: devel

On Sat, 19 Dec 2009 03:26:40 +0300 Alexey Tourbin wrote:

> On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > Actually I think maybe we should integrate eu-elflint into
> > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > at binutils semi-bugs, and otherwise it's useful.
> 
> So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> as well?  On one hand, some packages won't build.  But on the other,
> I believe that verify-elf is important (e.g. more important than verify-info).

It seems that there is a problem with new elflint on ARM:

Verifying ELF objects in /usr/src/tmp/rpm-buildroot
(arch=normal,fhs=relaxed,lint=normal,rpath=normal,stack=no,textrel=normal,unresolved=normal)
section [ 7] '.rel.dyn': relocation 317: relocation type invalid for
the file type 
section [ 7] '.rel.dyn': relocation 326: relocation type
invalid for the file type 
section [ 7] '.rel.dyn': relocation 331:
relocation type invalid for the file type 
section [ 7] '.rel.dyn': relocation 334: relocation type invalid for
the file type

http://195.239.66.165:280/tasks/12576/build/1/arm/log


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21  8:47           ` Anton V. Boyarshinov
@ 2009-12-21 10:55             ` Anton V. Boyarshinov
  0 siblings, 0 replies; 28+ messages in thread
From: Anton V. Boyarshinov @ 2009-12-21 10:55 UTC (permalink / raw)
  To: devel

On Mon, 21 Dec 2009 11:47:34 +0300 Anton V. Boyarshinov wrote:

> On Sat, 19 Dec 2009 03:26:40 +0300 Alexey Tourbin wrote:
> 
> > On Fri, Dec 18, 2009 at 03:05:42AM +0300, Alexey Tourbin wrote:
> > > Actually I think maybe we should integrate eu-elflint into
> > > /usr/lib/rpm/verify-elf.  It has --gnu-ld flag to stop barking
> > > at binutils semi-bugs, and otherwise it's useful.
> > 
> > So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> > to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> > as well?  On one hand, some packages won't build.  But on the other,
> > I believe that verify-elf is important (e.g. more important than verify-info).
> 
> It seems that there is a problem with new elflint on ARM:
> 

Also see:
http://195.239.66.165:280/tasks/12582/


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [devel] [SOLVED] verify-elf lint=normal (elflint)
  2009-12-21  6:25                         ` REAL
@ 2009-12-21 18:06                           ` Alexey Tourbin
  2009-12-22  3:34                             ` [devel] CMAKE please (was: [SOLVED] verify-elf lint=normal (elflint)) REAL
  0 siblings, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-21 18:06 UTC (permalink / raw)
  To: ALT Linux Team development discussions

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

On Mon, Dec 21, 2009 at 01:25:45PM +0700, REAL wrote:
> Alexey Tourbin пишет:
> >>http://git.altlinux.org/tasks/17565/task/log.5
> >
> >Please understand that
> >1) 4.0.4-alt98.25+ is about sisyphus, and you are trying to build
> >for branch 5.1.
> >2) elflint will not help you to build the package.
> >It is only to diagnose malformed binaries.
> 
> But what shall I do to build CGAL for branch 5.1?

This whole issue is due to buggy CMake.

When installing binaries into buildroot, CMake removes RPATH from the
binaries.  The RPATH removal appears to be a low-level stuff hardcoded
in C+plus.  Sometimes it works.


+2009-06-10 14:11  king
+
+       * Source/cmComputeLinkInformation.cxx: BUG: Do not mangle symbols
+         when editing RPATHs
+
+         In ELF binaries the .dynstr string table is used both for the
+         RPATH string and for program symbols.  If a symbol name happens
+         to match the end of the build-tree RPATH string the linker is
+         allowed to merge the symbols.
+
+         We must not allow this when the RPATH string will be replaced
+         during installation because it will mangle the symbol.  Therefore
+         we always pad the end of the build-tree RPATH with ':' if it will
+         be replaced.  Tools tend not to use ':' at the end of symbol
+         names, so it is unlikely to conflict.  See issue #9130.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-19 23:57                 ` Alexey Tourbin
  2009-12-20  2:37                   ` Alexey Tourbin
@ 2009-12-21 20:08                   ` Dmitry V. Levin
  2009-12-21 20:54                     ` Michael Shigorin
  2009-12-24  0:57                     ` Alexey Tourbin
  1 sibling, 2 replies; 28+ messages in thread
From: Dmitry V. Levin @ 2009-12-21 20:08 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 8977 bytes --]

On Sun, Dec 20, 2009 at 02:57:38AM +0300, Alexey Tourbin wrote:
> On Sun, Dec 20, 2009 at 12:42:19AM +0300, Dmitry V. Levin wrote:
> > On Sun, Dec 20, 2009 at 12:03:49AM +0300, Alexey Tourbin wrote:
> > > On Sat, Dec 19, 2009 at 10:50:07PM +0300, Dmitry V. Levin wrote:
> > > > On Sat, Dec 19, 2009 at 03:26:40AM +0300, Alexey Tourbin wrote:
> > > > > So... new VERIFY_ELF_LINT method is ready, and in Sisyphus, it is going
> > > > > to be enabled (lint=normal) by default.  Shall I enable it for branch-5.1
> > > > > as well?
> > > > 
> > > > Let's check whether eu-elflint has yet more false positives to be fixed.
> > > 
> > > How do we check?  Checking the existing (pre-compiled) packages is
> > > useless, since most of them are compiled with older toolchain (and
> > > most of the lint warnings will go away as packages are recompiled).
> > 
> > For example, we could introduce this new check as "relaxed" and run
> > a test rebuild.
> > 
> > > Okay, probably I'm going to release 4.0.4-alt98.25 anyway.
> > 
> > Next test rebuild is going to start now, but I can delay it to get new
> > rpmbuild packaged first.
> 
> 4.0.4-alt98.25 with lint=relaxed is in sisyphus.

Actually it was 4.0.4-alt98.26.
Test rebuild results (on i586) show that 26 of 9259 successfully
rebuilt packages are reported to have eu-elflint --gnu-ld errors:

Mesa-4:7.7-alt0.rc3
section [27] 'wtext' is both executable and writable
verify-elf: WARNING: ./usr/lib/X11/libGL.so.1.2: eu-elflint failed

alsa-firmware-1.0.20-alt1
invalid machine flags: 0x80000000
section [ 2] '.text' is executable in nonexecutable segment 1
loadable segment [8] is writable but contains no writable sections
loadable segment [10] is writable but contains no writable sections
verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: eu-elflint failed
verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: STACK entry not found

avr-libc-1:1.6.7-alt1
verify-elf: WARNING: ./usr/lib/avr/lib/avr25/crt86401.o: eu-elflint failed
[106 lines skipped]
verify-elf: WARNING: ./usr/lib/avr/lib/crttn861.o: eu-elflint failed

cpuburn-1.4-alt5
loadable segment [1] is writable but contains no writable sections
verify-elf: WARNING: ./usr/bin/burnBX: eu-elflint failed
loadable segment [1] is writable but contains no writable sections
verify-elf: WARNING: ./usr/bin/burnMMX: eu-elflint failed

emacs23-23.1-alt1
section [ 5] '.dynsym': symbol 220: st_value out of bounds
[...]
section [ 5] '.dynsym': symbol 253: st_value out of bounds
section [24] '.bss' has type NOBITS but is read from the file in segment of program header entry 2
verify-elf: WARNING: ./usr/bin/emacs23-athena: eu-elflint failed
verify-elf: WARNING: ./usr/bin/emacs23-gtk: eu-elflint failed
verify-elf: WARNING: ./usr/bin/emacs23-motif: eu-elflint failed
verify-elf: WARNING: ./usr/bin/emacs23-nox: eu-elflint failed

firebird-odbc-2.0.0147-alt1
section [ 7] '.rel.dyn': relocation 6361: relocation type invalid for the file type
[...]
section [ 7] '.rel.dyn': relocation 6987: relocation type invalid for the file type
verify-elf: WARNING: ./usr/lib/libOdbcFb.so: eu-elflint failed
the file containing the function 'IscDbcLibrary::Attachment::Attachment()' is not compiled with -fpic/-fPIC
[...]
the file containing the function 'typeinfo for OdbcJdbcLibrary::OdbcObject' is not compiled with -fpic/-fPIC
verify-elf: WARNING: ./usr/lib/libOdbcFb.so: TEXTREL entry found: 0x00000000

glibc-6:2.10.1-alt8
loadable segment [1] is writable but contains no writable sections
verify-elf: WARNING: ./sbin/glibc_preinstall: eu-elflint failed

ipw3945d-1.7.22-alt1
program header entry 8: unknown program header entry type 0x65041580
verify-elf: WARNING: ./usr/sbin/ipw3945d: eu-elflint failed

kexec-tools-2.0.1-alt1
loadable segment [1] is writable but contains no writable sections
verify-elf: WARNING: ./usr/lib/kexec-tools/kexec_test: eu-elflint failed
verify-elf: WARNING: ./usr/lib/kexec-tools/kexec_test: STACK entry not found

klibc-1.5.15-alt4
loadable segment [3] is writable but contains no writable sections
verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/cat: eu-elflint failed
[9 lines skipped]
verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/umount: eu-elflint failed
loadable segment [3] is writable but contains no writable sections
verify-elf: WARNING: ./usr/lib/klibc/bin/cat: eu-elflint failed
[12 lines skipped]
section [ 4] '.interp' present in object file
section [ 4] '.interp' has SHF_ALLOC flag set but there is no loadable segment
verify-elf: WARNING: ./usr/lib/klibc/lib/interp.o: eu-elflint failed

libunwind-0.99-alt4
section [ 3] '.dynsym': symbol 28: symbol in dynamic symbol table with non-default visibility
[...]
section [ 3] '.dynsym': symbol 94: symbol in dynamic symbol table with non-default visibility
verify-elf: WARNING: ./usr/lib/libunwind-ptrace.so.0.0.0: eu-elflint failed
verify-elf: WARNING: ./usr/lib/libunwind-x86.so.7.0.0: eu-elflint failed
verify-elf: WARNING: ./usr/lib/libunwind.so.7.0.0: eu-elflint failed

libxine-1.1.16.3-alt1
section [ 3] '.dynsym': symbol 131: symbol in dynamic symbol table with non-default visibility
[...]
section [ 3] '.dynsym': symbol 515: symbol in dynamic symbol table with non-default visibility
verify-elf: WARNING: ./usr/lib/libxine.so.1.26.1: eu-elflint failed

mbrola-3.01-alt3.1
section [ 3] '.dynsym': symbol 4 does not fit completely in referenced section [ 8] '.init'
section [ 3] '.dynsym': symbol 5 does not fit completely in referenced section [11] '.fini'
verify-elf: WARNING: ./usr/bin/mbrola: eu-elflint failed

minised-1.12-alt2
section [ 7] '.note': unknown object file note type 0 at offset 20
section [ 7] '.note': unknown object file note type 0 at offset 40
verify-elf: WARNING: ./usr/bin/minised: eu-elflint failed

nbd-2.9.11-alt2
section [ 7] '.note': unknown object file note type 0 at offset 20
verify-elf: WARNING: ./usr/sbin/nbd-client.static: eu-elflint failed

nvidia_glx_src_173.14.22-173.14.22-alt56
nvidia_glx_src_190.42-190.42-alt74
nvidia_glx_src_190.53-190.53-alt74
nvidia_glx_src_96.43.14-96.43.14-alt46
[elf files in these packages are FULL of various bugs, no reason to list them here]

qemu-0.11.92-alt1
section [ 2] '.text' has wrong flags: expected ALLOC|EXECINSTR, is WRITE|ALLOC|EXECINSTR
section [ 2] '.text' is both executable and writable
verify-elf: WARNING: ./usr/share/qemu/openbios-ppc: eu-elflint failed
verify-elf: WARNING: ./usr/share/qemu/openbios-sparc32: eu-elflint failed
verify-elf: WARNING: ./usr/share/qemu/openbios-sparc64: eu-elflint failed

qutim-3:0.2.0-alt1
section [ 7] '.rel.dyn': relocation 70: relocation type invalid for the file type
[...]
section [ 7] '.rel.dyn': relocation 95: relocation type invalid for the file type
verify-elf: WARNING: ./usr/lib/qutim/libplugman.so: eu-elflint failed
the file containing the function 'QZipWriter::QZipWriter(QIODevice*)' is not compiled with -fpic/-fPIC
[...]
the file containing the function 'QZipReader::count() const' is not compiled with -fpic/-fPIC
verify-elf: WARNING: ./usr/lib/qutim/libplugman.so: TEXTREL entry found: 0x00000000
verify-elf: WARNING: ./usr/bin/qutim: RPATH entry found: /usr/lib

scantailor-0.9.7.2-alt1
section [ 4] '.dynsym': symbol 1: local symbol outside range described in sh_info
[...]
section [ 4] '.dynsym': symbol 5: local symbol outside range described in sh_info
section [ 6] '.gnu.version': symbol 1: local symbol with global scope
[...]
section [ 6] '.gnu.version': symbol 5: local symbol with global scope
verify-elf: WARNING: ./usr/bin/scantailor: eu-elflint failed

tuxvsclippy-0.2.5-alt2
verify-elf: WARNING: ./usr/lib/tuxvsclippy/sprite/counter.sprite: eu-elflint failed
[16 lines skipped]
verify-elf: WARNING: ./usr/lib/tuxvsclippy/sprite/wolk.sprite: eu-elflint failed
[a LOT of various bugs]

util-linux-2.16.1-alt3
loadable segment [1] is writable but contains no writable sections
verify-elf: WARNING: ./sbin/nologin: eu-elflint failed
verify-elf: WARNING: ./usr/bin/pause: eu-elflint failed

virtualbox-3.0.10-alt1.1
verify-elf: WARNING: ./usr/lib/virtualbox/VBoxDD.so: eu-elflint failed
[16 lines skipped]
verify-elf: WARNING: ./usr/lib/virtualbox/VirtualBox.so: eu-elflint failed
verify-elf: WARNING: ./usr/lib/virtualbox/components/VBoxC.so: eu-elflint failed
verify-elf: WARNING: ./usr/lib/virtualbox/components/VBoxSVCM.so: eu-elflint failed
[a LOT of various bugs]

xorg-drv-rendition-1:4.2.2-alt1
unknown machine type 15666
invalid machine flags: 0x20000001
section [ 2] '.rodata' has wrong flags: expected ALLOC and possibly MERGE|STRINGS, is WRITE
section [ 7] '.symtab': symbol 1: st_value out of bounds
[...]
section [ 7] '.symtab': symbol 5: st_value out of bounds
verify-elf: WARNING: ./usr/lib/X11/modules/v10002d.uc: eu-elflint failed
verify-elf: WARNING: ./usr/lib/X11/modules/v20002d.uc: eu-elflint failed


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21 20:08                   ` [devel] verify-elf lint=normal (elflint) Dmitry V. Levin
@ 2009-12-21 20:54                     ` Michael Shigorin
  2009-12-22  7:12                       ` Anton Farygin
  2009-12-24  0:57                     ` Alexey Tourbin
  1 sibling, 1 reply; 28+ messages in thread
From: Michael Shigorin @ 2009-12-21 20:54 UTC (permalink / raw)
  To: ALT Devel discussion list

On Mon, Dec 21, 2009 at 11:08:52PM +0300, Dmitry V. Levin wrote:
> Test rebuild results (on i586) show that 26 of 9259 successfully
> rebuilt packages are reported to have eu-elflint --gnu-ld errors:
> 
> alsa-firmware-1.0.20-alt1
> invalid machine flags: 0x80000000
> section [ 2] '.text' is executable in nonexecutable segment 1
> loadable segment [8] is writable but contains no writable sections
> loadable segment [10] is writable but contains no writable sections
> verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: eu-elflint failed
> verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: STACK entry not found

В /lib/firmware смотреть незачем, наверное.

> avr-libc-1:1.6.7-alt1
> verify-elf: WARNING: ./usr/lib/avr/lib/avr25/crt86401.o: eu-elflint failed
> [106 lines skipped]
> verify-elf: WARNING: ./usr/lib/avr/lib/crttn861.o: eu-elflint failed

Тоже в список исключений?

> ipw3945d-1.7.22-alt1
> program header entry 8: unknown program header entry type 0x65041580
> verify-elf: WARNING: ./usr/sbin/ipw3945d: eu-elflint failed

А этот пакет ещё нужен?

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [devel] CMAKE please (was: [SOLVED] verify-elf lint=normal (elflint))
  2009-12-21 18:06                           ` [devel] [SOLVED] " Alexey Tourbin
@ 2009-12-22  3:34                             ` REAL
  0 siblings, 0 replies; 28+ messages in thread
From: REAL @ 2009-12-22  3:34 UTC (permalink / raw)
  To: ALT Linux Team development discussions

Alexey Tourbin пишет:
> On Mon, Dec 21, 2009 at 01:25:45PM +0700, REAL wrote:
>> Alexey Tourbin пишет:
>>>> http://git.altlinux.org/tasks/17565/task/log.5
>>> Please understand that
>>> 1) 4.0.4-alt98.25+ is about sisyphus, and you are trying to build
>>> for branch 5.1.
>>> 2) elflint will not help you to build the package.
>>> It is only to diagnose malformed binaries.
>> But what shall I do to build CGAL for branch 5.1?
> 
> This whole issue is due to buggy CMake.
> 
> When installing binaries into buildroot, CMake removes RPATH from the
> binaries.  The RPATH removal appears to be a low-level stuff hardcoded
> in C+plus.  Sometimes it works.

Просьба портировать в бранч 5.1 новый cmake. В нём этот баг 
отсутствует, а устраивать безумные игрища вокруг RPATH - несерьёзно, 
грустно и не буду.

-- 

REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21 20:54                     ` Michael Shigorin
@ 2009-12-22  7:12                       ` Anton Farygin
  0 siblings, 0 replies; 28+ messages in thread
From: Anton Farygin @ 2009-12-22  7:12 UTC (permalink / raw)
  To: ALT Linux Team development discussions

21.12.2009 23:54, Michael Shigorin пишет:
> On Mon, Dec 21, 2009 at 11:08:52PM +0300, Dmitry V. Levin wrote:
>> Test rebuild results (on i586) show that 26 of 9259 successfully
>> rebuilt packages are reported to have eu-elflint --gnu-ld errors:
>>
>> alsa-firmware-1.0.20-alt1
>> invalid machine flags: 0x80000000
>> section [ 2] '.text' is executable in nonexecutable segment 1
>> loadable segment [8] is writable but contains no writable sections
>> loadable segment [10] is writable but contains no writable sections
>> verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: eu-elflint failed
>> verify-elf: WARNING: ./lib/firmware/mixart/miXart8.elf: STACK entry not found
>
> В /lib/firmware смотреть незачем, наверное.
>
>> avr-libc-1:1.6.7-alt1
>> verify-elf: WARNING: ./usr/lib/avr/lib/avr25/crt86401.o: eu-elflint failed
>> [106 lines skipped]
>> verify-elf: WARNING: ./usr/lib/avr/lib/crttn861.o: eu-elflint failed
>
> Тоже в список исключений?
>
>> ipw3945d-1.7.22-alt1
>> program header entry 8: unknown program header entry type 0x65041580
>> verify-elf: WARNING: ./usr/sbin/ipw3945d: eu-elflint failed
>
> А этот пакет ещё нужен?

Не нужен, надо удалить.

$ ssh git.alt acl sisyphus ipw3945d show
ipw3945d        bga karpov @qa

Удалите, пожалуйста, его из Sisyphus и 5.1.


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-21 20:08                   ` [devel] verify-elf lint=normal (elflint) Dmitry V. Levin
  2009-12-21 20:54                     ` Michael Shigorin
@ 2009-12-24  0:57                     ` Alexey Tourbin
  2009-12-24  4:33                       ` Alexey Tourbin
  1 sibling, 1 reply; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-24  0:57 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

On Mon, Dec 21, 2009 at 11:08:52PM +0300, Dmitry V. Levin wrote:
> glibc-6:2.10.1-alt8
> loadable segment [1] is writable but contains no writable sections
> verify-elf: WARNING: ./sbin/glibc_preinstall: eu-elflint failed

> klibc-1.5.15-alt4
> loadable segment [3] is writable but contains no writable sections
> verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/cat: eu-elflint failed
> [9 lines skipped]
> verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/umount: eu-elflint failed
> loadable segment [3] is writable but contains no writable sections
> verify-elf: WARNING: ./usr/lib/klibc/bin/cat: eu-elflint failed
> [12 lines skipped]
> section [ 4] '.interp' present in object file
> section [ 4] '.interp' has SHF_ALLOC flag set but there is no loadable segment
> verify-elf: WARNING: ./usr/lib/klibc/lib/interp.o: eu-elflint failed

> util-linux-2.16.1-alt3
> loadable segment [1] is writable but contains no writable sections
> verify-elf: WARNING: ./sbin/nologin: eu-elflint failed
> verify-elf: WARNING: ./usr/bin/pause: eu-elflint failed

It looks like all klibc executables (compiled with klcc) are subject
to this warning.  Let's try to fix it before we discuss whether
lint=normal should be on by default.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [devel] verify-elf lint=normal (elflint)
  2009-12-24  0:57                     ` Alexey Tourbin
@ 2009-12-24  4:33                       ` Alexey Tourbin
  0 siblings, 0 replies; 28+ messages in thread
From: Alexey Tourbin @ 2009-12-24  4:33 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 8291 bytes --]

On Thu, Dec 24, 2009 at 03:57:22AM +0300, Alexey Tourbin wrote:
> On Mon, Dec 21, 2009 at 11:08:52PM +0300, Dmitry V. Levin wrote:
> > glibc-6:2.10.1-alt8
> > loadable segment [1] is writable but contains no writable sections
> > verify-elf: WARNING: ./sbin/glibc_preinstall: eu-elflint failed
> 
> > klibc-1.5.15-alt4
> > loadable segment [3] is writable but contains no writable sections
> > verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/cat: eu-elflint failed
> > [9 lines skipped]
> > verify-elf: WARNING: ./lib/mkinitrd/klibc/bin/umount: eu-elflint failed
> > loadable segment [3] is writable but contains no writable sections
> > verify-elf: WARNING: ./usr/lib/klibc/bin/cat: eu-elflint failed
> > [12 lines skipped]
> > section [ 4] '.interp' present in object file
> > section [ 4] '.interp' has SHF_ALLOC flag set but there is no loadable segment
> > verify-elf: WARNING: ./usr/lib/klibc/lib/interp.o: eu-elflint failed
> 
> > util-linux-2.16.1-alt3
> > loadable segment [1] is writable but contains no writable sections
> > verify-elf: WARNING: ./sbin/nologin: eu-elflint failed
> > verify-elf: WARNING: ./usr/bin/pause: eu-elflint failed
> 
> It looks like all klibc executables (compiled with klcc) are subject
> to this warning.  Let's try to fix it before we discuss whether
> lint=normal should be on by default.

Let's test a simple program to examine the problem.

$ cat test.c
int foo = 0;
int main()
{
        return 0;
}
$ klcc test.c && readelf --segments a.out && eu-elflint --gnu-ld a.out
Elf file type is EXEC (Executable file)
Entry point 0x4000e8
There are 3 program headers, starting at offset 64
Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x00000000000001ac 0x00000000000001ac  R E    200000
  LOAD           0x00000000000001b0 0x00000000006001b0 0x00000000006001b0
                 0x0000000000000000 0x0000000000000030  RW     200000
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
 Section to Segment mapping:
  Segment Sections...
   00     .text 
   01     .bss 
   02     
loadable segment [1] is writable but contains no writable sections
$ 

The last line, which is eu-elflint output, suggests there's a problem.
Now, if we replace "foo = 0" with "foo = 1", the test will pass.

$ cat test.c
int foo = 1;
int main()
{
        return 0;
}
$ klcc test.c && readelf --segments a.out && eu-elflint --gnu-ld a.out
Elf file type is EXEC (Executable file)
Entry point 0x4000e8
There are 3 program headers, starting at offset 64
Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x00000000000001ac 0x00000000000001ac  R E    200000
  LOAD           0x00000000000001ac 0x00000000006001ac 0x00000000006001ac
                 0x0000000000000004 0x000000000000002c  RW     200000
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RWE    8

 Section to Segment mapping:
  Segment Sections...
   00     .text 
   01     .data .bss 
   02     
No errors
$

(The last line now says "No errors".)

So the problem is that, while ".data" section contributes to the ELF
segment being writable, ".bss" section alone does not.

Let's see the code.

elfutils-0.143/src/elflint.c:
  3694        if (ehdr->e_type != ET_REL && (shdr->sh_flags & SHF_ALLOC) != 0)
  3695          {
  3696            /* Make sure the section is contained in a loaded segment
  3697               and that the initialization part matches NOBITS sections.  */
  3698            int pcnt;
  3699            GElf_Phdr phdr_mem;
  3700            GElf_Phdr *phdr;
  3701  
  3702            for (pcnt = 0; pcnt < ehdr->e_phnum; ++pcnt)
  3703              if ((phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem)) != NULL
  3704                  && ((phdr->p_type == PT_LOAD
  3705                       && (shdr->sh_flags & SHF_TLS) == 0)
  3706                      || (phdr->p_type == PT_TLS
  3707                          && (shdr->sh_flags & SHF_TLS) != 0))
  3708                  && phdr->p_offset <= shdr->sh_offset
  3709                  && (phdr->p_offset + phdr->p_filesz > shdr->sh_offset
  3710                      || (phdr->p_offset + phdr->p_memsz > shdr->sh_offset
  3711                          && shdr->sh_type == SHT_NOBITS)))
  3712                {
  3713                  /* Found the segment.  */
  3714                  if (phdr->p_offset + phdr->p_memsz
  3715                      < shdr->sh_offset + shdr->sh_size)
  3716                    ERROR (gettext ("\
  3717  section [%2zu] '%s' not fully contained in segment of program header entry %d\n"),
  3718                           cnt, section_name (ebl, cnt), pcnt);
  3719  
  3720                  if (shdr->sh_type == SHT_NOBITS)
  3721                    {
  3722                      if (shdr->sh_offset < phdr->p_offset + phdr->p_filesz
  3723                          && !is_debuginfo)
  3724                        ERROR (gettext ("\
  3725  section [%2zu] '%s' has type NOBITS but is read from the file in segment of program header entry %d\n"),
  3726                           cnt, section_name (ebl, cnt), pcnt);
  3727                    }
  3728                  else
  3729                    {
  3730                      const GElf_Off end = phdr->p_offset + phdr->p_filesz;
  3731                      if (shdr->sh_offset > end ||
  3732                          (shdr->sh_offset == end && shdr->sh_size != 0))
  3733                        ERROR (gettext ("\
  3734  section [%2zu] '%s' has not type NOBITS but is not read from the file in segment of program header entry %d\n"),
  3735                           cnt, section_name (ebl, cnt), pcnt);
  3736                    }
  3737  
  3738                  if (shdr->sh_type != SHT_NOBITS)
  3739                    {
  3740                      if ((shdr->sh_flags & SHF_EXECINSTR) != 0)
  3741                        {
  3742                          segment_flags[pcnt] |= PF_X;
  3743                          if ((phdr->p_flags & PF_X) == 0)
  3744                            ERROR (gettext ("\
  3745  section [%2zu] '%s' is executable in nonexecutable segment %d\n"),
  3746                                   cnt, section_name (ebl, cnt), pcnt);
  3747                        }
  3748  
  3749                      if ((shdr->sh_flags & SHF_WRITE) != 0)
  3750                        {
  3751                          segment_flags[pcnt] |= PF_W;
  3752                          if (0   /* XXX vdso images have this */
  3753                              && (phdr->p_flags & PF_W) == 0)
  3754                            ERROR (gettext ("\
  3755  section [%2zu] '%s' is writable in unwritable segment %d\n"),
  3756                                   cnt, section_name (ebl, cnt), pcnt);
  3757                        }
  3758                    }

This code tests each allocatable section (3694) and, among other things,
sets segments_flags (3742, 3751) -- permissions which corresponding ELF
segment should have (the segments are tested later against segments_flags).
However, only NOBITS sections contribute to ELF segment flags (3738).
This is possibly wrong: ".bss" section, despite the fact that it is
NOBITS (filled with zeroes upon startup), should be writable.

Here's a dumb patch which fixes the problem.

--- src/elflint.c-	2009-12-24 01:09:24 +0000
+++ src/elflint.c	2009-12-24 03:48:23 +0000
@@ -3794,7 +3794,10 @@ section [%2zu] '%s' has not type NOBITS 
 section [%2zu] '%s' is executable in nonexecutable segment %d\n"),
 				 cnt, section_name (ebl, cnt), pcnt);
 		      }
+		  }
 
+		if (shdr->sh_type != SHT_NOBITS || strcmp (scnname, ".bss") == 0)
+		  {
 		    if ((shdr->sh_flags & SHF_WRITE) != 0)
 		      {
 			segment_flags[pcnt] |= PF_W;

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2009-12-24  4:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17 21:52 ` [devel] 5.1 FAILED cgal.git=3.5-alt0.M51.1 Alexey Tourbin
2009-12-17 21:59   ` Alexey Tourbin
2009-12-17 22:44     ` Dmitry V. Levin
2009-12-18  0:05       ` Alexey Tourbin
2009-12-18  0:59         ` [devel] elflint Alexey Tourbin
2009-12-18  3:21           ` Dmitry V. Levin
2009-12-18 17:27             ` Alexey Tourbin
2009-12-18 17:44               ` Dmitry V. Levin
2009-12-18  2:23         ` [devel] eu-elflint Dmitry V. Levin
2009-12-18  2:49           ` Alexey Tourbin
2009-12-19  0:26         ` [devel] verify-elf lint=normal (elflint) Alexey Tourbin
2009-12-19 19:50           ` Dmitry V. Levin
2009-12-19 21:03             ` Alexey Tourbin
2009-12-19 21:42               ` Dmitry V. Levin
2009-12-19 23:57                 ` Alexey Tourbin
2009-12-20  2:37                   ` Alexey Tourbin
2009-12-21  6:06                     ` REAL
2009-12-21  6:02                       ` Alexey Tourbin
2009-12-21  6:25                         ` REAL
2009-12-21 18:06                           ` [devel] [SOLVED] " Alexey Tourbin
2009-12-22  3:34                             ` [devel] CMAKE please (was: [SOLVED] verify-elf lint=normal (elflint)) REAL
2009-12-21 20:08                   ` [devel] verify-elf lint=normal (elflint) Dmitry V. Levin
2009-12-21 20:54                     ` Michael Shigorin
2009-12-22  7:12                       ` Anton Farygin
2009-12-24  0:57                     ` Alexey Tourbin
2009-12-24  4:33                       ` Alexey Tourbin
2009-12-21  8:47           ` Anton V. Boyarshinov
2009-12-21 10:55             ` Anton V. Boyarshinov

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git