Ticket #1363 (new defect)

Opened 2 years ago

Last modified 2 years ago

Executable stripping broken with file-5.33+

Reported by: mgorny Owned by:
Priority: Sometime Milestone:
Component: core/paludis Version: scm
Keywords: Cc:
Blocked By: Blocking:
Distribution: N/A

Description

Arfrever poked me about it. Upstream changed the output, so rules in [1] no longer work correctly:

--- file-5.32/magic/Magdir/elf +++ file-5.33/magic/Magdir/elf @@ -1,6 +1,6 @@

#------------------------------------------------------------------------------

-# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $ +# $File: elf,v 1.72 2018/02/24 19:50:04 christos Exp $

# elf: file(1) magic for ELF executables # # We have to check the byte order flag to see what byte order all the

@@ -48,8 +48,9 @@

!:mime application/x-object

16 leshort 2 executable,

!:mime application/x-executable

->16 leshort 3 shared object, -!:mime application/x-sharedlib +>16 leshort 3 ${x?pie executable:shared object} + +!:mime application/x-${x?pie-executable:sharedlib}

16 leshort 4 core file

!:mime application/x-coredump # Core file detection is not reliable.

Note the 'pie executable'.

Gentoo Bug:  https://bugs.gentoo.org/653352

[1]: https://git.exherbo.org/paludis/paludis.git/tree/paludis/stripper.cc#n200

Attachments

paludis-stripper-pie-executable.patch Download (793 bytes) - added by volkov 2 years ago.

Change History

comment:1 Changed 2 years ago by mgorny

Re-paste:

--- file-5.32/magic/Magdir/elf
+++ file-5.33/magic/Magdir/elf
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $
+# $File: elf,v 1.72 2018/02/24 19:50:04 christos Exp $
 # elf:  file(1) magic for ELF executables
 #
 # We have to check the byte order flag to see what byte order all the
@@ -48,8 +48,9 @@
 !:mime application/x-object
 >16    leshort         2               executable,
 !:mime application/x-executable
->16    leshort         3               shared object,
-!:mime application/x-sharedlib
+>16    leshort         3               ${x?pie executable:shared object}
+
+!:mime application/x-${x?pie-executable:sharedlib}
 >16    leshort         4               core file
 !:mime application/x-coredump
 # Core file detection is not reliable.

Changed 2 years ago by volkov

comment:2 Changed 2 years ago by volkov

Add pie executable (>=sys-apps/file-5.33) support for stripper

paludis-stripper-pie-executable.patch

Note: See TracTickets for help on using tickets.