Skip to content

Commit

Permalink
Fix page size on Alpha
Browse files Browse the repository at this point in the history
All tests pass.

Also explicitly specifies -no-pie for executables which should have it
disabled, to be compatible with gccs built with --enable-default-pie.
  • Loading branch information
matoro authored and Mic92 committed Nov 18, 2024
1 parent ace831c commit 1c443aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/patchelf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ unsigned int ElfFile<ElfFileParamNames>::getPageSize() const noexcept
// requirements. There is no authoritative list of these values. The
// current list is extracted from GNU gold's source code (abi_pagesize).
switch (rdi(hdr()->e_machine)) {
case EM_ALPHA:
case EM_IA_64:
case EM_MIPS:
case EM_PPC:
Expand Down
4 changes: 3 additions & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ LIBS =
check_PROGRAMS = simple-pie simple simple-execstack main too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections

no_rpath_arch_TESTS = \
no-rpath-alpha.sh \
no-rpath-amd64.sh \
no-rpath-armel.sh \
no-rpath-armhf.sh \
Expand Down Expand Up @@ -80,7 +81,7 @@ export NIX_LDFLAGS=
simple_SOURCES = simple.c
# no -fpic for simple.o
simple_CFLAGS =
simple_LDFLAGS = -Wl,-z,noexecstack
simple_LDFLAGS = -Wl,-z,noexecstack -no-pie

simple_pie_SOURCES = simple.c
simple_pie_CFLAGS = -fPIC -pie
Expand Down Expand Up @@ -171,6 +172,7 @@ libmany_syms_so_LDFLAGS = $(LDFLAGS_sharedlib)
no_rpath_SOURCES = no-rpath.c
# no -fpic for no-rpath.o
no_rpath_CFLAGS =
no_rpath_LDFLAGS = -no-pie

contiguous_note_sections_SOURCES = contiguous-note-sections.s contiguous-note-sections.ld
contiguous_note_sections_LDFLAGS = -nostdlib -T $(srcdir)/contiguous-note-sections.ld
Expand Down
Binary file added tests/no-rpath-prebuild/no-rpath-alpha
Binary file not shown.

0 comments on commit 1c443aa

Please sign in to comment.