summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDomen Kožar <domen@cachix.org>2021-08-03 16:30:13 +0200
committerDomen Kožar <domen@cachix.org>2021-08-03 16:30:13 +0200
commit4d03718b170ac87d93799678ddaf1d226703845f (patch)
tree536b49177cdc6df390e4f2d61f5ac186d9bbe6fa /tests
parentb6c73c4c93d5d61bdb6af8d66a318fb100cbc6c5 (diff)
downloadpatchelf-4d03718b170ac87d93799678ddaf1d226703845f.tar.gz
Revert "tests: add testcase for alignment issues with contiguous note sections"
This reverts commit fccd901efef720d1d843b5c2071158903f92863c.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/contiguous_note_sections.ld22
-rw-r--r--tests/contiguous_note_sections.s23
-rwxr-xr-xtests/contiguous_note_sections.sh6
4 files changed, 2 insertions, 57 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9b9e23e..91a31b6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
LIBS =
-check_PROGRAMS = simple main main-scoped big-dynstr no-rpath contiguous_note_sections
+check_PROGRAMS = simple main main-scoped big-dynstr no-rpath
no_rpath_arch_TESTS = \
no-rpath-amd64.sh \
@@ -27,8 +27,7 @@ src_TESTS = \
output-flag.sh \
no-rpath-pie-powerpc.sh \
build-id.sh \
- invalid-elf.sh \
- contiguous_note_sections.sh
+ invalid-elf.sh
build_TESTS = \
$(no_rpath_arch_TESTS)
@@ -107,6 +106,3 @@ libsimple_so_LDFLAGS = $(LDFLAGS_sharedlib)
no_rpath_SOURCES = no-rpath.c
# no -fpic for no-rpath.o
no_rpath_CFLAGS =
-
-contiguous_note_sections_SOURCES = contiguous_note_sections.s
-contiguous_note_sections_CFLAGS = -nostdlib -T contiguous_note_sections.ld
diff --git a/tests/contiguous_note_sections.ld b/tests/contiguous_note_sections.ld
deleted file mode 100644
index 8678a60..0000000
--- a/tests/contiguous_note_sections.ld
+++ /dev/null
@@ -1,22 +0,0 @@
-PHDRS
-{
- headers PT_PHDR PHDRS ;
- notes PT_NOTE;
- text PT_LOAD FILEHDR PHDRS ;
- data PT_LOAD ;
- interp PT_INTERP ;
- dynamic PT_DYNAMIC ;
-}
-
-SECTIONS
-{
- . = SIZEOF_HEADERS;
- .note.my-section0 : { *(.note.my-section0) } :notes :text
- .note.my-section1 : { *(.note.my-section1) } :notes :text
-
- .interp : { *(.interp) } :text :interp
- .text : { *(.text) } :text
- .rodata : { *(.rodata) } /* defaults to :text */
-
- .data : { *(.data) } :data
-}
diff --git a/tests/contiguous_note_sections.s b/tests/contiguous_note_sections.s
deleted file mode 100644
index 87f6044..0000000
--- a/tests/contiguous_note_sections.s
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Testcase for error:
- * patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections
- */
-.section ".note.my-section0", "a", @note
- .align 4
- .long 1f - 0f /* name length (not including padding) */
- .long 3f - 2f /* desc length (not including padding) */
- .long 1 /* type = NT_VERSION */
-0: .asciz "my-version-12345" /* name */
-1: .align 4
-2: .long 1 /* desc - toolchain version number, 32-bit LE */
-3: .align 4
-
-.section ".note.my-section1", "a", @note
- .align 8
- .long 1f - 0f /* name length (not including padding) */
- .long 3f - 2f /* desc length (not including padding) */
- .long 1 /* type = NT_VERSION */
-0: .asciz "my-version-1" /* name */
-1: .align 4
-2: .long 1 /* desc - toolchain version number, 32-bit LE */
-3: .align 4
diff --git a/tests/contiguous_note_sections.sh b/tests/contiguous_note_sections.sh
deleted file mode 100755
index 8bc8f3c..0000000
--- a/tests/contiguous_note_sections.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh -e
-
-# Running --set-interpreter on this binary should not produce the following
-# error:
-# patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections
-../src/patchelf --set-interpreter ld-linux-x86-64.so.2 contiguous_note_sections