Просмотр исходного кода

dpkg-gensymbols: Add support for arch-bits and arch-endian tags

These allow to tag symbols as being only relevant on architectures with
specific bits or endianness. The current supported values are 32 and 64
for arch-bits, and little and big for arch-endian.

They can also be combined by using multiple tags on the same symbol.

Closes: #630342
Guillem Jover лет назад: 11
Родитель
Сommit
08ce938d42

+ 2 - 0
debian/changelog

@@ -20,6 +20,8 @@ dpkg (1.18.0) UNRELEASED; urgency=low
     header.
   * Switch C/C++ code to use a new set of C locale character type functions
     independent of the current locale.
+  * Add support for arch-bits and arch-endian dpkg-gensymbols tags.
+    Closes: #630342
 
  -- Guillem Jover <guillem@debian.org>  Tue, 09 Dec 2014 23:53:18 +0100
 

+ 30 - 9
man/dpkg-gensymbols.1

@@ -2,7 +2,7 @@
 .\"
 .\" Copyright © 2007-2011 Raphaël Hertzog <hertzog@debian.org>
 .\" Copyright © 2009-2010 Modestas Vainius <modestas@vainius.eu>
-.\" Copyright © 2012-2013 Guillem Jover <guillem@debian.org>
+.\" Copyright © 2012-2014 Guillem Jover <guillem@debian.org>
 .\"
 .\" This is free software; you can redistribute it and/or modify
 .\" it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-gensymbols 1 "2013-09-06" "Debian Project" "dpkg utilities"
+.TH dpkg\-gensymbols 1 "2014-12-29" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-gensymbols \- generate symbols files (shared library dependency information)
 .
@@ -158,18 +158,25 @@ not cause ABI breakage. For example, most of C++ template instantiations fall
 into this category. Like any other tag, this one may also have an arbitrary
 value: it could be used to indicate why the symbol is considered optional.
 .TP
-.B arch=\fIarchitecture list\fR
-This tag allows one to restrict the set of architectures where the symbol
-is supposed to exist. When the symbols list is updated with the symbols
+.B arch=\fIarchitecture-list\fR
+.TQ
+.B arch\-bits=\fIarchitecture-bits\fR
+.TQ
+.B arch\-endian=\fIarchitecture-endianness\fR
+These tags allow one to restrict the set of architectures where the symbol
+is supposed to exist. The \fBarch\-bits\fP and \fBarch\-endian\fP tags
+are supported since dpkg 1.18.0. When the symbols list is updated with
+the symbols
 discovered in the library, all arch-specific symbols which do not concern
 the current host architecture are treated as if they did not exist. If an
 arch-specific symbol matching the current host architecture does not exist
 in the library, normal procedures for missing symbols apply and it may
 cause \fBdpkg\-gensymbols\fR to fail. On the other hand, if the
 arch-specific symbol is found when it was not supposed to exist (because
-the current host architecture is not listed in the tag), it is made arch
-neutral (i.e. the arch tag is dropped and the symbol will appear in the
-diff due to this change), but it is not considered as new.
+the current host architecture is not listed in the tag or does not match
+the endianness and bits), it is made arch neutral (i.e. the arch, arch-bits
+and arch-endian tags are dropped and the symbol will appear in the diff due
+to this change), but it is not considered as new.
 
 When operating in the default non-template mode, among arch-specific symbols
 only those that match the current host architecture are written to the
@@ -177,7 +184,7 @@ symbols file. On the contrary, all arch-specific symbols (including those
 from foreign arches) are always written to the symbol file when operating
 in template mode.
 
-The format of \fIarchitecture list\fR is the same as the one used in the
+The format of \fIarchitecture-list\fR is the same as the one used in the
 \fBBuild\-Depends\fP field of \fIdebian/control\fR (except the enclosing
 square brackets []). For example, the first symbol from the list below
 will be considered only on alpha, any\-amd64 and ia64 architectures,
@@ -187,6 +194,20 @@ except on armel.
  (arch=alpha any\-amd64 ia64)a_64bit_specific_symbol@Base 1.0
  (arch=linux\-any)linux_specific_symbol@Base 1.0
  (arch=!armel)symbol_armel_does_not_have@Base 1.0
+
+The \fIarchitecture-bits\fP is either \fB32\fP or \fB64\fP.
+
+ (arch-bits=32)a_32bit_specific_symbol@Base 1.0
+ (arch-bits=64)a_64bit_specific_symbol@Base 1.0
+
+The \fIarchitecture-endianness\fP is either \fBlittle\fP or \fBbig\fP.
+
+ (arch-endian=little)a_little_endian_specific_symbol@Base 1.0
+ (arch-endian=big)a_big_endian_specific_symbol@Base 1.0
+
+Multiple restrictions can be chained.
+
+ (arch-bits=32|arch-endian=little)a_32bit_le_symbol@Base 1.0
 .TP
 .B ignore\-blacklist
 dpkg\-gensymbols has an internal blacklist of symbols that should not

+ 12 - 5
scripts/Dpkg/Shlibs/Symbol.pm

@@ -24,7 +24,7 @@ our $VERSION = '0.01';
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 use Dpkg::Util qw(:list);
-use Dpkg::Arch qw(debarch_is_concerned);
+use Dpkg::Arch qw(debarch_is_concerned debarch_to_cpuattrs);
 use Dpkg::Version;
 use Storable ();
 use Dpkg::Shlibs::Cppfilt;
@@ -294,9 +294,14 @@ sub arch_is_concerned {
     my ($self, $arch) = @_;
     my $arches = $self->{tags}{arch};
 
-    if (defined $arch && defined $arches) {
-        return debarch_is_concerned($arch, split /[\s,]+/, $arches);
-    }
+    return 0 if defined $arch && defined $arches &&
+                !debarch_is_concerned($arch, split /[\s,]+/, $arches);
+
+    my ($bits, $endian) = debarch_to_cpuattrs($arch);
+    return 0 if defined $bits && defined $self->{tags}{'arch-bits'} &&
+                $bits ne $self->{tags}{'arch-bits'};
+    return 0 if defined $endian && defined $self->{tags}{'arch-endian'} &&
+                $endian ne $self->{tags}{'arch-endian'};
 
     return 1;
 }
@@ -447,8 +452,10 @@ sub mark_found_in_library {
     # Never remove arch tags from patterns
     if (not $self->is_pattern()) {
 	if (not $self->arch_is_concerned($arch)) {
-	    # Remove arch tag because it is incorrect.
+	    # Remove arch tags because they are incorrect.
 	    $self->delete_tag('arch');
+	    $self->delete_tag('arch-bits');
+	    $self->delete_tag('arch-endian');
 	}
     }
 }

+ 9 - 1
scripts/Makefile.am

@@ -251,6 +251,7 @@ test_data = \
 	t/Dpkg_Shlibs/objdump.space \
 	t/Dpkg_Shlibs/objdump.basictags-amd64 \
 	t/Dpkg_Shlibs/objdump.basictags-i386 \
+	t/Dpkg_Shlibs/objdump.basictags-mips \
 	t/Dpkg_Shlibs/objdump.blacklisted \
 	t/Dpkg_Shlibs/objdump.patterns \
 	t/Dpkg_Shlibs/objdump.glib-ia64 \
@@ -299,15 +300,20 @@ test_data = \
 test_data_objects = \
 	t/Dpkg_Shlibs/libobjdump.basictags-amd64.so \
 	t/Dpkg_Shlibs/libobjdump.basictags-i386.so \
+	t/Dpkg_Shlibs/libobjdump.basictags-mips.so \
 	t/Dpkg_Shlibs/libobjdump.patterns.so
 
 $(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-amd64.so: $(srcdir)/t/Dpkg_Shlibs/basictags.c
 	$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 $< \
 	  -DAMD64 -o $@
 
+$(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-mips.so: $(srcdir)/t/Dpkg_Shlibs/basictags.c
+	$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 $< \
+	  -DMIPS -o $@
+
 $(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-i386.so: $(srcdir)/t/Dpkg_Shlibs/basictags.c
 	$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 $< \
-	  -o $@
+	  -DI386 -o $@
 
 $(srcdir)/t/Dpkg_Shlibs/libobjdump.patterns.so: $(srcdir)/t/Dpkg_Shlibs/patterns.cpp $(srcdir)/t/Dpkg_Shlibs/patterns.map
 	$(CXX) $(CXXFLAGS) -shared -fPIC -Wl,-soname -Wl,libpatterns.so.1 \
@@ -323,6 +329,8 @@ refresh-test-data: $(test_data_objects)
 	  >$(srcdir)/t/Dpkg_Shlibs/objdump.basictags-amd64
 	$(OBJDUMP) $(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-i386.so \
 	  >$(srcdir)/t/Dpkg_Shlibs/objdump.basictags-i386
+	$(OBJDUMP) $(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-mips.so \
+	  >$(srcdir)/t/Dpkg_Shlibs/objdump.basictags-mips
 	$(OBJDUMP) $(srcdir)/t/Dpkg_Shlibs/libobjdump.patterns.so \
 	  >$(srcdir)/t/Dpkg_Shlibs/objdump.patterns
 	$(OBJDUMP) `which ls` >$(srcdir)/t/Dpkg_Shlibs/objdump.ls

+ 51 - 4
scripts/t/Dpkg_Shlibs.t

@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 118;
+use Test::More tests => 122;
 use Cwd;
 use IO::String;
 
@@ -355,10 +355,28 @@ is(${$io->string_ref()},
 | libbasictags1 (>= 1.1)
  symbol11_optional@Base 1.1 1
  symbol21_amd64@Base 2.1
+ symbol25_64@Base 2.5
+ symbol26_little@Base 2.6
  symbol31_randomtag@Base 3.1
  symbol51_untagged@Base 5.1
 ', 'template vs. non-template on amd64');
 
+# Dumping in non-template mode (mips) (test for arch tags)
+$io = IO::String->new();
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/basictags.symbols", arch => 'mips');
+$sym_file->output($io);
+is(${$io->string_ref()},
+'libbasictags.so.1 libbasictags1 #MINVER#
+| libbasictags1 (>= 1.1)
+ symbol11_optional@Base 1.1 1
+ symbol23_mips@Base 2.3
+ symbol24_32@Base 2.4
+ symbol27_big@Base 2.7
+ symbol31_randomtag@Base 3.1
+ symbol42_mips_and_optional@Base 4.2
+ symbol51_untagged@Base 5.1
+', 'template vs. non-template on mips');
+
 # Dumping in non-template mode (i386) (test for arch tags)
 $io = IO::String->new();
 $sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/basictags.symbols", arch => 'i386');
@@ -369,6 +387,9 @@ is(${$io->string_ref()},
 | libbasictags1 (>= 1.1)
  symbol11_optional@Base 1.1 1
  symbol22_i386@Base 2.2
+ symbol24_32@Base 2.4
+ symbol26_little@Base 2.6
+ symbol28_little_32@Base 2.8
  symbol31_randomtag@Base 3.1
  symbol41_i386_and_optional@Base 4.1
  symbol51_untagged@Base 5.1
@@ -443,6 +464,9 @@ is( $sym->get_symbolspec(1), ' symbol21_amd64@Base 2.1', 'no tags => no quotes i
 
 # - arch specific symbol disappears
 delete $tags_obj_i386->{dynsyms}{'symbol22_i386@Base'};
+delete $tags_obj_i386->{dynsyms}{'symbol24_32@Base'};
+delete $tags_obj_i386->{dynsyms}{'symbol26_little@Base'};
+delete $tags_obj_i386->{dynsyms}{'symbol28_little_32@Base'};
 delete $tags_obj_i386->{dynsyms}{'symbol41_i386_and_optional@Base'};
 $sym_file->merge_symbols($tags_obj_i386, '100.MISSING');
 
@@ -450,9 +474,30 @@ $sym = $sym_file->lookup_symbol('symbol22_i386@Base', ['libbasictags.so.1'], 1);
 is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol22_i386@Base',
 		  symbol_templ => 'symbol22_i386@Base',
 		  minver => '2.2', dep_id => 0, deprecated => '100.MISSING',
-		  tags => { arch => '!amd64 !ia64 !alpha' },
+		  tags => { arch => '!amd64 !ia64 !mips' },
 		  tagorder => [ 'arch' ]),
 	    'disappeared arch specific symbol gets deprecated');
+$sym = $sym_file->lookup_symbol('symbol24_32@Base', ['libbasictags.so.1'], 1);
+is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol24_32@Base',
+		  symbol_templ => 'symbol24_32@Base',
+		  minver => '2.4', dep_id => 0, deprecated => '100.MISSING',
+		  tags => { 'arch-bits' => '32' },
+		  tagorder => [ 'arch-bits' ]),
+	    'disappeared arch bits specific symbol gets deprecated');
+$sym = $sym_file->lookup_symbol('symbol26_little@Base', ['libbasictags.so.1'], 1);
+is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol26_little@Base',
+		  symbol_templ => 'symbol26_little@Base',
+		  minver => '2.6', dep_id => 0, deprecated => '100.MISSING',
+		  tags => { 'arch-endian' => 'little' },
+		  tagorder => [ 'arch-endian' ]),
+	    'disappeared arch endian specific symbol gets deprecated');
+$sym = $sym_file->lookup_symbol('symbol28_little_32@Base', ['libbasictags.so.1'], 1);
+is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol28_little_32@Base',
+		  symbol_templ => 'symbol28_little_32@Base',
+		  minver => '2.8', dep_id => 0, deprecated => '100.MISSING',
+		  tags => { 'arch-bits' => '32', 'arch-endian' => 'little' },
+		  tagorder => [ 'arch-bits', 'arch-endian' ]),
+	    'disappeared arch bits and endian specific symbol gets deprecated');
 $sym = $sym_file->lookup_symbol('symbol41_i386_and_optional@Base', ['libbasictags.so.1'], 1);
 is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol41_i386_and_optional@Base',
 		  symbol_templ => 'symbol41_i386_and_optional@Base',
@@ -461,8 +506,10 @@ is_deeply($sym, Dpkg::Shlibs::Symbol->new(symbol => 'symbol41_i386_and_optional@
 		  tags => { arch => 'i386', optional => 'reason' },
 		  tagorder => [ 'arch', 'optional' ]),
 	    'disappeared optional arch specific symbol gets deprecated');
-@tmp = map { $_->{symbol}->get_symbolname() } $sym_file->get_lost_symbols($sym_file_dup);
-is_deeply( \@tmp, [ 'symbol22_i386@Base' ], "missing arch specific is LOST, but optional arch specific isn't");
+@tmp = sort map { $_->{symbol}->get_symbolname() } $sym_file->get_lost_symbols($sym_file_dup);
+is_deeply(\@tmp, [ 'symbol22_i386@Base', 'symbol24_32@Base',
+                   'symbol26_little@Base', 'symbol28_little_32@Base' ],
+          "missing arch specific is LOST, but optional arch specific isn't");
 
 # Tests for tagged #includes
 $sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.include-3", arch => 'i386');

+ 36 - 6
scripts/t/Dpkg_Shlibs/basictags.c

@@ -3,31 +3,61 @@
  *     -o libbasictags.so.1 -DAMD64 basictags.c
  * $ objdump -wfpTR libbasictags.so.1 > objdump.basictags-amd64
  * $ gcc -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 \
- *     -o libbasictags.so.1 basictags.c
+ *     -o libbasictags.so.1 -DI386 basictags.c
  * $ objdump -wfpTR libbasictags.so.1 > objdump.basictags-i386
+ * $ gcc -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 \
+ *     -o libbasictags.so.1 -DMIPS basictags.c
+ * $ objdump -wfpTR libbasictags.so.1 > objdump.basictags-mips
  */
 
 void symbol11_optional(void);
 void symbol11_optional(void) {}
 
-#ifdef AMD64
+#if defined(AMD64)
 void symbol21_amd64(void);
 void symbol21_amd64(void) {}
-#endif
-
-#ifndef AMD64
+#elif defined(I386)
 void symbol22_i386(void);
 void symbol22_i386(void) {}
+#elif defined(MIPS)
+void symbol23_mips(void);
+void symbol23_mips(void) {}
+#endif
+
+#if defined(AMD64)
+void symbol25_64(void);
+void symbol25_64(void) {}
+#else
+void symbol24_32(void);
+void symbol24_32(void) {}
+#endif
+
+#if defined(MIPS)
+void symbol27_big(void);
+void symbol27_big(void) {}
+#else
+void symbol26_little(void);
+void symbol26_little(void) {}
+#endif
+
+#if defined(I386)
+void symbol28_little_32(void);
+void symbol28_little_32(void) {}
 #endif
 
 void symbol31_randomtag(void);
 void symbol31_randomtag(void) {}
 
 /* (arch=i386|optional)symbol41_i386_and_optional@Base */
-#ifndef AMD64
+#if defined(I386)
 void symbol41_i386_and_optional(void);
 void symbol41_i386_and_optional(void) {}
 #endif
+/* (arch=mips|optional)symbol42_i386_and_optional@Base */
+#if defined(MIPS)
+void symbol42_mips_and_optional(void);
+void symbol42_mips_and_optional(void) {}
+#endif
 
 void symbol51_untagged(void);
 void symbol51_untagged(void) {}

+ 8 - 1
scripts/t/Dpkg_Shlibs/basictags.symbols

@@ -2,7 +2,14 @@ libbasictags.so.1 libbasictags1 #MINVER#
 | libbasictags1 (>= 1.1)
  (optional)symbol11_optional@Base 1.1 1
  (arch=amd64 ia64 alpha)'symbol21_amd64@Base' 2.1
- (arch=!amd64 !ia64 !alpha)symbol22_i386@Base 2.2
+ (arch=!amd64 !ia64 !mips)symbol22_i386@Base 2.2
+ (arch=!amd64 !ia64 !i386)symbol23_mips@Base 2.3
+ (arch-bits=32)symbol24_32@Base 2.4
+ (arch-bits=64)symbol25_64@Base 2.5
+ (arch-endian=little)symbol26_little@Base 2.6
+ (arch-endian=big)symbol27_big@Base 2.7
+ (arch-bits=32|arch-endian=little)symbol28_little_32@Base 2.8
  (randomtagname=randomtagvalue)symbol31_randomtag@Base 3.1
  (arch=i386|optional=reason)"symbol41_i386_and_optional@Base" 4.1
+ (arch=mips|optional=reason)"symbol42_mips_and_optional@Base" 4.2
  symbol51_untagged@Base 5.1

+ 48 - 37
scripts/t/Dpkg_Shlibs/objdump.basictags-amd64

@@ -2,71 +2,82 @@
 ./t/Dpkg_Shlibs/libobjdump.basictags-amd64.so:     file format elf32-i386
 architecture: i386, flags 0x00000150:
 HAS_SYMS, DYNAMIC, D_PAGED
-start address 0x00000410
+start address 0x00000480
 
 Program Header:
     LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
-         filesz 0x00000628 memsz 0x00000628 flags r-x
-    LOAD off    0x00000628 vaddr 0x00001628 paddr 0x00001628 align 2**12
-         filesz 0x00000108 memsz 0x00000110 flags rw-
- DYNAMIC off    0x0000063c vaddr 0x0000163c paddr 0x0000163c align 2**2
-         filesz 0x000000d0 memsz 0x000000d0 flags rw-
+         filesz 0x00000724 memsz 0x00000724 flags r-x
+    LOAD off    0x00000724 vaddr 0x00001724 paddr 0x00001724 align 2**12
+         filesz 0x00000120 memsz 0x00000124 flags rw-
+ DYNAMIC off    0x00000730 vaddr 0x00001730 paddr 0x00001730 align 2**2
+         filesz 0x000000e8 memsz 0x000000e8 flags rw-
     NOTE off    0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
          filesz 0x00000024 memsz 0x00000024 flags r--
-EH_FRAME off    0x00000564 vaddr 0x00000564 paddr 0x00000564 align 2**2
-         filesz 0x00000034 memsz 0x00000034 flags r--
-   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
+EH_FRAME off    0x00000628 vaddr 0x00000628 paddr 0x00000628 align 2**2
+         filesz 0x00000044 memsz 0x00000044 flags r--
+   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
          filesz 0x00000000 memsz 0x00000000 flags rw-
 
 Dynamic Section:
   NEEDED               libc.so.6
   SONAME               libbasictags.so.1
-  INIT                 0x000003a8
-  FINI                 0x00000548
-  HASH                 0x00000118
-  GNU_HASH             0x00000160
+  INIT                 0x00000424
+  FINI                 0x00000614
+  INIT_ARRAY           0x00001724
+  INIT_ARRAYSZ         0x00000004
+  FINI_ARRAY           0x00001728
+  FINI_ARRAYSZ         0x00000004
+  GNU_HASH             0x00000118
   STRTAB               0x00000278
-  SYMTAB               0x000001a8
-  STRSZ                0x000000c5
+  SYMTAB               0x00000168
+  STRSZ                0x00000117
   SYMENT               0x00000010
-  PLTGOT               0x00001718
+  PLTGOT               0x0000182c
   PLTRELSZ             0x00000010
   PLTREL               0x00000011
-  JMPREL               0x00000398
-  REL                  0x00000378
-  RELSZ                0x00000020
+  JMPREL               0x00000414
+  REL                  0x000003d4
+  RELSZ                0x00000040
   RELENT               0x00000008
-  VERNEED              0x00000358
+  VERNEED              0x000003b4
   VERNEEDNUM           0x00000001
-  VERSYM               0x0000033e
-  RELCOUNT             0x00000001
+  VERSYM               0x00000390
+  RELCOUNT             0x00000003
 
 Version References:
   required from libc.so.6:
     0x09691f73 0x00 02 GLIBC_2.1.3
 
 DYNAMIC SYMBOL TABLE:
+00000000  w   D  *UND*	00000000              _ITM_deregisterTMCloneTable
 00000000  w   DF *UND*	00000000  GLIBC_2.1.3 __cxa_finalize
 00000000  w   D  *UND*	00000000              __gmon_start__
 00000000  w   D  *UND*	00000000              _Jv_RegisterClasses
-00001730 g    D  *ABS*	00000000  Base        _edata
-00001738 g    D  *ABS*	00000000  Base        _end
-000004e0 g    DF .text	00000002  Base        symbol21_amd64
-00001730 g    D  *ABS*	00000000  Base        __bss_start
-000003a8 g    DF .init	00000000  Base        _init
-000004f0 g    DF .text	00000002  Base        symbol31_randomtag
-00000548 g    DF .fini	00000000  Base        _fini
-00000500 g    DF .text	00000002  Base        symbol51_untagged
-000004d0 g    DF .text	00000002  Base        symbol11_optional
+00000000  w   D  *UND*	00000000              _ITM_registerTMCloneTable
+00001844 g    D  .data	00000000  Base        _edata
+000005f0 g    DF .text	00000002  Base        symbol26_little
+00001848 g    D  .bss	00000000  Base        _end
+000005d0 g    DF .text	00000002  Base        symbol21_amd64
+00001844 g    D  .bss	00000000  Base        __bss_start
+000005e0 g    DF .text	00000002  Base        symbol25_64
+00000424 g    DF .init	00000000  Base        _init
+00000600 g    DF .text	00000002  Base        symbol31_randomtag
+00000614 g    DF .fini	00000000  Base        _fini
+00000610 g    DF .text	00000002  Base        symbol51_untagged
+000005c0 g    DF .text	00000002  Base        symbol11_optional
 
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-0000172c R_386_RELATIVE    *ABS*
-0000170c R_386_GLOB_DAT    __cxa_finalize
-00001710 R_386_GLOB_DAT    __gmon_start__
-00001714 R_386_GLOB_DAT    _Jv_RegisterClasses
-00001724 R_386_JUMP_SLOT   __cxa_finalize
-00001728 R_386_JUMP_SLOT   __gmon_start__
+00001724 R_386_RELATIVE    *ABS*
+00001728 R_386_RELATIVE    *ABS*
+00001840 R_386_RELATIVE    *ABS*
+00001818 R_386_GLOB_DAT    _ITM_deregisterTMCloneTable
+0000181c R_386_GLOB_DAT    __cxa_finalize
+00001820 R_386_GLOB_DAT    __gmon_start__
+00001824 R_386_GLOB_DAT    _Jv_RegisterClasses
+00001828 R_386_GLOB_DAT    _ITM_registerTMCloneTable
+00001838 R_386_JUMP_SLOT   __cxa_finalize
+0000183c R_386_JUMP_SLOT   __gmon_start__
 
 

+ 51 - 39
scripts/t/Dpkg_Shlibs/objdump.basictags-i386

@@ -2,72 +2,84 @@
 ./t/Dpkg_Shlibs/libobjdump.basictags-i386.so:     file format elf32-i386
 architecture: i386, flags 0x00000150:
 HAS_SYMS, DYNAMIC, D_PAGED
-start address 0x00000440
+start address 0x000004e0
 
 Program Header:
     LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
-         filesz 0x00000684 memsz 0x00000684 flags r-x
-    LOAD off    0x00000684 vaddr 0x00001684 paddr 0x00001684 align 2**12
-         filesz 0x00000108 memsz 0x00000110 flags rw-
- DYNAMIC off    0x00000698 vaddr 0x00001698 paddr 0x00001698 align 2**2
-         filesz 0x000000d0 memsz 0x000000d0 flags rw-
+         filesz 0x000007dc memsz 0x000007dc flags r-x
+    LOAD off    0x000007dc vaddr 0x000017dc paddr 0x000017dc align 2**12
+         filesz 0x00000120 memsz 0x00000124 flags rw-
+ DYNAMIC off    0x000007e8 vaddr 0x000017e8 paddr 0x000017e8 align 2**2
+         filesz 0x000000e8 memsz 0x000000e8 flags rw-
     NOTE off    0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
          filesz 0x00000024 memsz 0x00000024 flags r--
-EH_FRAME off    0x000005a4 vaddr 0x000005a4 paddr 0x000005a4 align 2**2
-         filesz 0x0000003c memsz 0x0000003c flags r--
-   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
+EH_FRAME off    0x000006a8 vaddr 0x000006a8 paddr 0x000006a8 align 2**2
+         filesz 0x00000054 memsz 0x00000054 flags r--
+   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
          filesz 0x00000000 memsz 0x00000000 flags rw-
 
 Dynamic Section:
   NEEDED               libc.so.6
   SONAME               libbasictags.so.1
-  INIT                 0x000003dc
-  FINI                 0x00000588
-  HASH                 0x00000118
-  GNU_HASH             0x00000164
-  STRTAB               0x00000290
-  SYMTAB               0x000001b0
-  STRSZ                0x000000df
+  INIT                 0x00000484
+  FINI                 0x00000694
+  INIT_ARRAY           0x000017dc
+  INIT_ARRAYSZ         0x00000004
+  FINI_ARRAY           0x000017e0
+  FINI_ARRAYSZ         0x00000004
+  GNU_HASH             0x00000118
+  STRTAB               0x000002a8
+  SYMTAB               0x00000178
+  STRSZ                0x00000144
   SYMENT               0x00000010
-  PLTGOT               0x00001774
+  PLTGOT               0x000018e4
   PLTRELSZ             0x00000010
   PLTREL               0x00000011
-  JMPREL               0x000003cc
-  REL                  0x000003ac
-  RELSZ                0x00000020
+  JMPREL               0x00000474
+  REL                  0x00000434
+  RELSZ                0x00000040
   RELENT               0x00000008
-  VERNEED              0x0000038c
+  VERNEED              0x00000414
   VERNEEDNUM           0x00000001
-  VERSYM               0x00000370
-  RELCOUNT             0x00000001
+  VERSYM               0x000003ec
+  RELCOUNT             0x00000003
 
 Version References:
   required from libc.so.6:
     0x09691f73 0x00 02 GLIBC_2.1.3
 
 DYNAMIC SYMBOL TABLE:
+00000000  w   D  *UND*	00000000              _ITM_deregisterTMCloneTable
 00000000  w   DF *UND*	00000000  GLIBC_2.1.3 __cxa_finalize
 00000000  w   D  *UND*	00000000              __gmon_start__
 00000000  w   D  *UND*	00000000              _Jv_RegisterClasses
-0000178c g    D  *ABS*	00000000  Base        _edata
-00001794 g    D  *ABS*	00000000  Base        _end
-00000530 g    DF .text	00000002  Base        symbol41_i386_and_optional
-00000510 g    DF .text	00000002  Base        symbol22_i386
-0000178c g    D  *ABS*	00000000  Base        __bss_start
-000003dc g    DF .init	00000000  Base        _init
-00000520 g    DF .text	00000002  Base        symbol31_randomtag
-00000588 g    DF .fini	00000000  Base        _fini
-00000540 g    DF .text	00000002  Base        symbol51_untagged
-00000500 g    DF .text	00000002  Base        symbol11_optional
+00000000  w   D  *UND*	00000000              _ITM_registerTMCloneTable
+000018fc g    D  .data	00000000  Base        _edata
+00000650 g    DF .text	00000002  Base        symbol26_little
+00001900 g    D  .bss	00000000  Base        _end
+00000680 g    DF .text	00000002  Base        symbol41_i386_and_optional
+00000630 g    DF .text	00000002  Base        symbol22_i386
+00000660 g    DF .text	00000002  Base        symbol28_little_32
+000018fc g    D  .bss	00000000  Base        __bss_start
+00000484 g    DF .init	00000000  Base        _init
+00000670 g    DF .text	00000002  Base        symbol31_randomtag
+00000640 g    DF .text	00000002  Base        symbol24_32
+00000694 g    DF .fini	00000000  Base        _fini
+00000690 g    DF .text	00000002  Base        symbol51_untagged
+00000620 g    DF .text	00000002  Base        symbol11_optional
 
 
 DYNAMIC RELOCATION RECORDS
 OFFSET   TYPE              VALUE 
-00001788 R_386_RELATIVE    *ABS*
-00001768 R_386_GLOB_DAT    __cxa_finalize
-0000176c R_386_GLOB_DAT    __gmon_start__
-00001770 R_386_GLOB_DAT    _Jv_RegisterClasses
-00001780 R_386_JUMP_SLOT   __cxa_finalize
-00001784 R_386_JUMP_SLOT   __gmon_start__
+000017dc R_386_RELATIVE    *ABS*
+000017e0 R_386_RELATIVE    *ABS*
+000018f8 R_386_RELATIVE    *ABS*
+000018d0 R_386_GLOB_DAT    _ITM_deregisterTMCloneTable
+000018d4 R_386_GLOB_DAT    __cxa_finalize
+000018d8 R_386_GLOB_DAT    __gmon_start__
+000018dc R_386_GLOB_DAT    _Jv_RegisterClasses
+000018e0 R_386_GLOB_DAT    _ITM_registerTMCloneTable
+000018f0 R_386_JUMP_SLOT   __cxa_finalize
+000018f4 R_386_JUMP_SLOT   __gmon_start__
 
 

+ 84 - 0
scripts/t/Dpkg_Shlibs/objdump.basictags-mips

@@ -0,0 +1,84 @@
+
+./t/Dpkg_Shlibs/libobjdump.basictags-mips.so:     file format elf32-i386
+architecture: i386, flags 0x00000150:
+HAS_SYMS, DYNAMIC, D_PAGED
+start address 0x000004b0
+
+Program Header:
+    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
+         filesz 0x00000780 memsz 0x00000780 flags r-x
+    LOAD off    0x00000780 vaddr 0x00001780 paddr 0x00001780 align 2**12
+         filesz 0x00000120 memsz 0x00000124 flags rw-
+ DYNAMIC off    0x0000078c vaddr 0x0000178c paddr 0x0000178c align 2**2
+         filesz 0x000000e8 memsz 0x000000e8 flags rw-
+    NOTE off    0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
+         filesz 0x00000024 memsz 0x00000024 flags r--
+EH_FRAME off    0x00000668 vaddr 0x00000668 paddr 0x00000668 align 2**2
+         filesz 0x0000004c memsz 0x0000004c flags r--
+   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
+         filesz 0x00000000 memsz 0x00000000 flags rw-
+
+Dynamic Section:
+  NEEDED               libc.so.6
+  SONAME               libbasictags.so.1
+  INIT                 0x00000458
+  FINI                 0x00000654
+  INIT_ARRAY           0x00001780
+  INIT_ARRAYSZ         0x00000004
+  FINI_ARRAY           0x00001784
+  FINI_ARRAYSZ         0x00000004
+  GNU_HASH             0x00000118
+  STRTAB               0x00000294
+  SYMTAB               0x00000174
+  STRSZ                0x0000012e
+  SYMENT               0x00000010
+  PLTGOT               0x00001888
+  PLTRELSZ             0x00000010
+  PLTREL               0x00000011
+  JMPREL               0x00000448
+  REL                  0x00000408
+  RELSZ                0x00000040
+  RELENT               0x00000008
+  VERNEED              0x000003e8
+  VERNEEDNUM           0x00000001
+  VERSYM               0x000003c2
+  RELCOUNT             0x00000003
+
+Version References:
+  required from libc.so.6:
+    0x09691f73 0x00 02 GLIBC_2.1.3
+
+DYNAMIC SYMBOL TABLE:
+00000000  w   D  *UND*	00000000              _ITM_deregisterTMCloneTable
+00000000  w   DF *UND*	00000000  GLIBC_2.1.3 __cxa_finalize
+00000000  w   D  *UND*	00000000              __gmon_start__
+00000000  w   D  *UND*	00000000              _Jv_RegisterClasses
+00000000  w   D  *UND*	00000000              _ITM_registerTMCloneTable
+000018a0 g    D  .data	00000000  Base        _edata
+000018a4 g    D  .bss	00000000  Base        _end
+00000640 g    DF .text	00000002  Base        symbol42_mips_and_optional
+000018a0 g    D  .bss	00000000  Base        __bss_start
+00000458 g    DF .init	00000000  Base        _init
+00000630 g    DF .text	00000002  Base        symbol31_randomtag
+00000610 g    DF .text	00000002  Base        symbol24_32
+00000654 g    DF .fini	00000000  Base        _fini
+00000650 g    DF .text	00000002  Base        symbol51_untagged
+000005f0 g    DF .text	00000002  Base        symbol11_optional
+00000600 g    DF .text	00000002  Base        symbol23_mips
+00000620 g    DF .text	00000002  Base        symbol27_big
+
+
+DYNAMIC RELOCATION RECORDS
+OFFSET   TYPE              VALUE 
+00001780 R_386_RELATIVE    *ABS*
+00001784 R_386_RELATIVE    *ABS*
+0000189c R_386_RELATIVE    *ABS*
+00001874 R_386_GLOB_DAT    _ITM_deregisterTMCloneTable
+00001878 R_386_GLOB_DAT    __cxa_finalize
+0000187c R_386_GLOB_DAT    __gmon_start__
+00001880 R_386_GLOB_DAT    _Jv_RegisterClasses
+00001884 R_386_GLOB_DAT    _ITM_registerTMCloneTable
+00001894 R_386_JUMP_SLOT   __cxa_finalize
+00001898 R_386_JUMP_SLOT   __gmon_start__
+
+