[Bug 229708] Don't require the program header for ELF files fit in the first page

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 4 20:34:21 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229708

--- Comment #7 from Alex S <iwtcex at gmail.com> ---
Created attachment 217754
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=217754&action=edit
executable

(In reply to Konstantin Belousov from comment #6)

> So will you supply me with the library ?

% uname -a
FreeBSD desktop 12.1-RELEASE-p8 FreeBSD 12.1-RELEASE-p8 GENERIC  amd64
% cat libhello.c 
#include <stdio.h>

__attribute__((constructor))
void hello() {
  printf("Hello there\n");
}
% cc -fPIC -shared libhello.c -o libhello.so
% .../patchelf --version
patchelf 0.9
% .../patchelf --set-soname hellothere.so libhello.so
% readelf -h libhello.so
...
  Start of program headers:          20480 (bytes into file)
  Start of section headers:          15048 (bytes into file)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list