100-portability.patch 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -20,6 +20,7 @@ dnl You should have received a copy of
  4. dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
  5. AC_INIT([elfutils],[0.191],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
  6. +AC_CONFIG_MACRO_DIRS([m4])
  7. dnl Workaround for older autoconf < 2.64
  8. m4_ifndef([AC_PACKAGE_URL],
  9. [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"],
  10. @@ -43,16 +44,17 @@ elif test "x$program_prefix" = "x"; then
  11. fi
  12. AC_CONFIG_AUX_DIR([config])
  13. -AC_CONFIG_FILES([config/Makefile])
  14. +AC_CONFIG_FILES([config/Makefile libgnu/Makefile])
  15. AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.])
  16. -AC_PREREQ(2.63) dnl Minimum Autoconf version required.
  17. +AC_PREREQ(2.64) dnl Minimum Autoconf version required.
  18. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
  19. AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
  20. AM_MAINTAINER_MODE
  21. AM_SILENT_RULES([yes])
  22. +AC_USE_SYSTEM_EXTENSIONS()
  23. AC_CONFIG_SRCDIR([libelf/libelf.h])
  24. AC_CONFIG_FILES([Makefile])
  25. @@ -89,12 +91,14 @@ AS_IF([test "$use_locks" = yes],
  26. AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
  27. m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
  28. +gl_EARLY
  29. +gl_INIT
  30. AC_PROG_CXX
  31. -AC_PROG_RANLIB
  32. AC_PROG_YACC
  33. AC_PROG_LEX([noyywrap])
  34. # Only available since automake 1.12
  35. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  36. +LT_INIT()
  37. AC_CHECK_TOOL([READELF], [readelf])
  38. AC_CHECK_TOOL([NM], [nm])
  39. @@ -195,7 +199,6 @@ AC_CACHE_CHECK([whether the compiler gen
  40. AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
  41. if test "$ac_cv_buildid" = "no"; then
  42. AC_MSG_WARN([compiler doesn't generate build-id by default])
  43. - LDFLAGS="$LDFLAGS -Wl,--build-id"
  44. fi
  45. ZRELRO_LDFLAGS="-Wl,-z,relro"
  46. @@ -635,36 +638,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],
  47. CFLAGS="$old_CFLAGS"])
  48. AS_IF([test "x$ac_cv_fno_addrsig" = "xyes"], CFLAGS="$CFLAGS -fno-addrsig")
  49. -saved_LIBS="$LIBS"
  50. -AC_SEARCH_LIBS([argp_parse], [argp])
  51. -LIBS="$saved_LIBS"
  52. -case "$ac_cv_search_argp_parse" in
  53. - no) AC_MSG_FAILURE([failed to find argp_parse]) ;;
  54. - -l*) argp_LDADD="$ac_cv_search_argp_parse" ;;
  55. - *) argp_LDADD= ;;
  56. -esac
  57. -AC_SUBST([argp_LDADD])
  58. -
  59. -saved_LIBS="$LIBS"
  60. -AC_SEARCH_LIBS([fts_close], [fts])
  61. -LIBS="$saved_LIBS"
  62. -case "$ac_cv_search_fts_close" in
  63. - no) AC_MSG_FAILURE([failed to find fts_close]) ;;
  64. - -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
  65. - *) fts_LIBS= ;;
  66. -esac
  67. -AC_SUBST([fts_LIBS])
  68. -
  69. -saved_LIBS="$LIBS"
  70. -AC_SEARCH_LIBS([_obstack_free], [obstack])
  71. -LIBS="$saved_LIBS"
  72. -case "$ac_cv_search__obstack_free" in
  73. - no) AC_MSG_FAILURE([failed to find _obstack_free]) ;;
  74. - -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
  75. - *) obstack_LIBS= ;;
  76. -esac
  77. -AC_SUBST([obstack_LIBS])
  78. -
  79. dnl The directories with content.
  80. dnl Documentation.
  81. --- a/libelf/elf_update.c
  82. +++ b/libelf/elf_update.c
  83. @@ -37,6 +37,33 @@
  84. #include "libelfP.h"
  85. +#include "elf_fill.c"
  86. +
  87. +#ifdef __APPLE__
  88. +static int posix_fallocate(int fd, off_t offset, off_t len)
  89. +{
  90. + off_t c_test;
  91. + int ret;
  92. + if (!__builtin_saddll_overflow(offset, len, &c_test)) {
  93. + fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, offset + len, 0};
  94. + // Try to get a continuous chunk of disk space
  95. + ret = fcntl(fd, F_PREALLOCATE, &store);
  96. + if (ret < 0) {
  97. + // OK, perhaps we are too fragmented, allocate non-continuous
  98. + store.fst_flags = F_ALLOCATEALL;
  99. + ret = fcntl(fd, F_PREALLOCATE, &store);
  100. + if (ret < 0) {
  101. + return ret;
  102. + }
  103. + }
  104. + ret = ftruncate(fd, offset + len);
  105. + } else {
  106. + // offset+len would overflow.
  107. + ret = -1;
  108. + }
  109. + return ret;
  110. +}
  111. +#endif
  112. static int64_t
  113. write_file (Elf *elf, int64_t size, int change_bo, size_t shnum)
  114. --- a/lib/eu-config.h
  115. +++ b/lib/eu-config.h
  116. @@ -59,14 +59,18 @@
  117. # define once(once_control, init_routine) init_routine()
  118. #endif /* USE_LOCKS */
  119. -#include <libintl.h>
  120. +#include <gettext.h>
  121. /* gettext helper macros. */
  122. #define N_(Str) Str
  123. #define _(Str) dgettext ("elfutils", Str)
  124. /* Compiler-specific definitions. */
  125. +#ifdef __APPLE__
  126. +#define strong_alias(name, aliasname)
  127. +#else
  128. #define strong_alias(name, aliasname) \
  129. extern __typeof (name) aliasname __attribute__ ((alias (#name)));
  130. +#endif
  131. #ifdef __i386__
  132. # define internal_function __attribute__ ((regparm (3), stdcall))
  133. @@ -77,12 +81,7 @@
  134. #define internal_strong_alias(name, aliasname) \
  135. extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function;
  136. -#ifdef HAVE_VISIBILITY
  137. -#define attribute_hidden \
  138. - __attribute__ ((visibility ("hidden")))
  139. -#else
  140. #define attribute_hidden /* empty */
  141. -#endif
  142. #ifdef HAVE_GCC_STRUCT
  143. #define attribute_packed \
  144. @@ -166,7 +165,7 @@ asm (".section predict_data, \"aw\"; .pr
  145. #endif
  146. /* Avoid PLT entries. */
  147. -#ifdef PIC
  148. +#if defined(PIC) && !defined(__APPLE__)
  149. # define INTUSE(name) _INTUSE(name)
  150. # define _INTUSE(name) __##name##_internal
  151. # define INTDEF(name) _INTDEF(name)
  152. --- a/config/eu.am
  153. +++ b/config/eu.am
  154. @@ -31,7 +31,7 @@
  155. ##
  156. DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
  157. -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  158. +AM_CPPFLAGS = -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
  159. # Drop the 'u' flag that automake adds by default. It is incompatible
  160. # with deterministic archives.
  161. --- a/libelf/Makefile.am
  162. +++ b/libelf/Makefile.am
  163. @@ -34,9 +34,7 @@ endif
  164. VERSION = 1
  165. -lib_LIBRARIES = libelf.a
  166. -noinst_LIBRARIES = libelf_pic.a
  167. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  168. +lib_LTLIBRARIES = libelf.la
  169. include_HEADERS = libelf.h gelf.h nlist.h
  170. noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
  171. @@ -51,7 +49,8 @@ endif
  172. pkginclude_HEADERS = elf-knowledge.h
  173. -libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
  174. +libelf_la_LIBADD = ../lib/libeu.la -lz $(zstd_LIBS) -lpthread
  175. +libelf_la_SOURCES = elf_version.c elf_hash.c elf_error.c \
  176. elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
  177. gelf_getclass.c elf_getbase.c elf_getident.c \
  178. elf32_fsize.c elf64_fsize.c gelf_fsize.c \
  179. @@ -102,37 +101,9 @@ libelf_a_SOURCES = elf_version.c elf_has
  180. elf32_getchdr.c elf64_getchdr.c gelf_getchdr.c \
  181. elf_compress.c elf_compress_gnu.c
  182. -libelf_pic_a_SOURCES =
  183. -am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
  184. -
  185. -libelf_so_DEPS = ../lib/libeu.a
  186. -libelf_so_LDLIBS = $(libelf_so_DEPS) -lz $(zstd_LIBS)
  187. -if USE_LOCKS
  188. -libelf_so_LDLIBS += -lpthread
  189. -endif
  190. -
  191. -libelf_so_LIBS = libelf_pic.a
  192. -libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
  193. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  194. - -Wl,--soname,$@.$(VERSION) \
  195. - -Wl,--version-script,$< \
  196. - $(NO_UNDEFINED) \
  197. - -Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \
  198. - $(libelf_so_LDLIBS)
  199. - @$(textrel_check)
  200. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  201. -
  202. -install: install-am libelf.so
  203. +install: install-am
  204. $(mkinstalldirs) $(DESTDIR)$(libdir)
  205. - $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
  206. - ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
  207. - ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
  208. uninstall: uninstall-am
  209. - rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
  210. - rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
  211. - rm -f $(DESTDIR)$(libdir)/libelf.so
  212. EXTRA_DIST = libelf.map
  213. -
  214. -CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
  215. --- a/backends/i386_auxv.c
  216. +++ b/backends/i386_auxv.c
  217. @@ -48,5 +48,4 @@ EBLHOOK(auxv_info) (GElf_Xword a_type, c
  218. return 1;
  219. }
  220. -__typeof (i386_auxv_info) x86_64_auxv_info
  221. - __attribute__ ((alias ("i386_auxv_info")));
  222. +auxv_info_alias(x86_64)
  223. --- a/backends/ppc_regs.c
  224. +++ b/backends/ppc_regs.c
  225. @@ -204,5 +204,11 @@ ppc_register_info (Ebl *ebl __attribute_
  226. return namelen;
  227. }
  228. -__typeof (ppc_register_info)
  229. - ppc64_register_info __attribute__ ((alias ("ppc_register_info")));
  230. +ssize_t
  231. +ppc64_register_info (Ebl *ebl,
  232. + int regno, char *name, size_t namelen,
  233. + const char **prefix, const char **setname,
  234. + int *bits, int *type)
  235. +{
  236. + return ppc_register_info(ebl, regno, name, namelen, prefix, setname, bits, type);
  237. +}
  238. --- a/backends/libebl_CPU.h
  239. +++ b/backends/libebl_CPU.h
  240. @@ -97,4 +97,10 @@ dwarf_is_pointer (int tag)
  241. case DW_TAG_reference_type: \
  242. case DW_TAG_rvalue_reference_type
  243. +#define auxv_info_alias(arch) \
  244. + int EBLHOOK_1(arch ## _, auxv_info) (GElf_Xword a_type, const char **name, const char **format) \
  245. + { \
  246. + return EBLHOOK(auxv_info)(a_type, name, format); \
  247. + }
  248. +
  249. #endif /* libebl_CPU.h */
  250. --- a/backends/ppc_auxv.c
  251. +++ b/backends/ppc_auxv.c
  252. @@ -51,5 +51,4 @@ EBLHOOK(auxv_info) (GElf_Xword a_type, c
  253. return 1;
  254. }
  255. -__typeof (ppc_auxv_info) ppc64_auxv_info
  256. - __attribute__ ((alias ("ppc_auxv_info")));
  257. +auxv_info_alias(ppc64)
  258. --- a/backends/ppc_cfi.c
  259. +++ b/backends/ppc_cfi.c
  260. @@ -72,6 +72,7 @@ ppc_abi_cfi (Ebl *ebl __attribute__ ((un
  261. return 0;
  262. }
  263. -__typeof (ppc_abi_cfi)
  264. - ppc64_abi_cfi
  265. - __attribute__ ((alias ("ppc_abi_cfi")));
  266. +int ppc64_abi_cfi(Ebl *ebl, Dwarf_CIE *abi_info)
  267. +{
  268. + return ppc_abi_cfi(ebl, abi_info);
  269. +}
  270. --- a/backends/ppc_initreg.c
  271. +++ b/backends/ppc_initreg.c
  272. @@ -68,9 +68,10 @@ ppc_dwarf_to_regno (Ebl *ebl __attribute
  273. abort ();
  274. }
  275. -__typeof (ppc_dwarf_to_regno)
  276. - ppc64_dwarf_to_regno
  277. - __attribute__ ((alias ("ppc_dwarf_to_regno")));
  278. +bool ppc64_dwarf_to_regno (Ebl *ebl, unsigned *regno)
  279. +{
  280. + return ppc_dwarf_to_regno(ebl, regno);
  281. +}
  282. bool
  283. ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
  284. @@ -127,6 +128,7 @@ ppc_set_initial_registers_tid (pid_t tid
  285. #endif /* __powerpc__ */
  286. }
  287. -__typeof (ppc_set_initial_registers_tid)
  288. - ppc64_set_initial_registers_tid
  289. - __attribute__ ((alias ("ppc_set_initial_registers_tid")));
  290. +bool ppc64_set_initial_registers_tid(pid_t tid, ebl_tid_registers_t *setfunc, void *arg)
  291. +{
  292. + return ppc_set_initial_registers_tid(tid, setfunc, arg);
  293. +}
  294. --- a/backends/ppc_attrs.c
  295. +++ b/backends/ppc_attrs.c
  296. @@ -81,6 +81,9 @@ ppc_check_object_attribute (Ebl *ebl __a
  297. return false;
  298. }
  299. -__typeof (ppc_check_object_attribute)
  300. - ppc64_check_object_attribute
  301. - __attribute__ ((alias ("ppc_check_object_attribute")));
  302. +bool ppc64_check_object_attribute(Ebl *ebl,
  303. + const char *vendor, int tag, uint64_t value,
  304. + const char **tag_name, const char **value_name)
  305. +{
  306. + return ppc_check_object_attribute(ebl, vendor, tag, value, tag_name, value_name);
  307. +}
  308. --- a/libdwfl/libdwflP.h
  309. +++ b/libdwfl/libdwflP.h
  310. @@ -31,6 +31,7 @@
  311. #include <libdwfl.h>
  312. #include <libebl.h>
  313. +#include <libeu.h>
  314. #include <assert.h>
  315. #include <dirent.h>
  316. #include <errno.h>
  317. --- /dev/null
  318. +++ b/lib/stdio_ext.h
  319. @@ -0,0 +1,6 @@
  320. +#include <stdio.h>
  321. +#ifndef __APPLE__
  322. +#include_next <stdio_ext.h>
  323. +#else
  324. +#define __fsetlocking(...) 0
  325. +#endif
  326. --- a/libdw/libdwP.h
  327. +++ b/libdw/libdwP.h
  328. @@ -32,10 +32,10 @@
  329. #include <stdbool.h>
  330. #include <pthread.h>
  331. +#include <libeu.h>
  332. #include <libdw.h>
  333. #include <dwarf.h>
  334. -
  335. /* Known location expressions already decoded. */
  336. struct loc_s
  337. {
  338. --- a/libdw/Makefile.am
  339. +++ b/libdw/Makefile.am
  340. @@ -34,14 +34,12 @@ endif
  341. AM_CPPFLAGS += -I$(srcdir)/../libebl -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf -pthread
  342. VERSION = 1
  343. -lib_LIBRARIES = libdw.a
  344. -noinst_LIBRARIES = libdw_pic.a
  345. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  346. +lib_LTLIBRARIES = libdw.la
  347. include_HEADERS = dwarf.h
  348. pkginclude_HEADERS = libdw.h known-dwarf.h
  349. -libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
  350. +libdw_la_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
  351. dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \
  352. dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \
  353. dwarf_attr.c dwarf_formstring.c \
  354. @@ -103,50 +101,12 @@ $(srcdir)/known-dwarf.h: $(top_srcdir)/c
  355. mv -f [email protected] $@
  356. endif
  357. -libdw_pic_a_SOURCES =
  358. -am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
  359. -
  360. -libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
  361. - ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \
  362. - ../libdwfl/libdwfl_pic.a
  363. -libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
  364. -libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread
  365. -libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
  366. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  367. - -Wl,--soname,$@.$(VERSION),--enable-new-dtags \
  368. - -Wl,--version-script,$< \
  369. - $(NO_UNDEFINED) \
  370. - -Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \
  371. - $(libdw_so_LDLIBS)
  372. - @$(textrel_check)
  373. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  374. -
  375. -install: install-am libdw.so
  376. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  377. - $(INSTALL_PROGRAM) libdw.so $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
  378. - ln -fs libdw-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdw.so.$(VERSION)
  379. - ln -fs libdw.so.$(VERSION) $(DESTDIR)$(libdir)/libdw.so
  380. -
  381. -uninstall: uninstall-am
  382. - rm -f $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
  383. - rm -f $(DESTDIR)$(libdir)/libdw.so.$(VERSION)
  384. - rm -f $(DESTDIR)$(libdir)/libdw.so
  385. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  386. -
  387. -libdwfl_objects = $(shell $(AR) t ../libdwfl/libdwfl.a)
  388. -libdw_a_LIBADD = $(addprefix ../libdwfl/,$(libdwfl_objects))
  389. -
  390. -libdwelf_objects = $(shell $(AR) t ../libdwelf/libdwelf.a)
  391. -libdw_a_LIBADD += $(addprefix ../libdwelf/,$(libdwelf_objects))
  392. -
  393. -libebl_objects = $(shell $(AR) t ../libebl/libebl.a)
  394. -libdw_a_LIBADD += $(addprefix ../libebl/,$(libebl_objects))
  395. -
  396. -backends_objects = $(shell $(AR) t ../backends/libebl_backends.a)
  397. -libdw_a_LIBADD += $(addprefix ../backends/,$(backends_objects))
  398. -
  399. -libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a)
  400. -libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects))
  401. +libdw_la_LIBADD = \
  402. + ../libdwfl/libdwfl.la \
  403. + ../libdwelf/libdwelf.la \
  404. + ../libebl/libebl.la \
  405. + ../backends/libebl_backends.la \
  406. + ../libcpu/libcpu.la
  407. noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \
  408. dwarf_sig8_hash.h cfi.h encoded-value.h
  409. --- a/libasm/Makefile.am
  410. +++ b/libasm/Makefile.am
  411. @@ -32,12 +32,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/libelf -I
  412. VERSION = 1
  413. -lib_LIBRARIES = libasm.a
  414. -noinst_LIBRARIES = libasm_pic.a
  415. -noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
  416. +lib_LTLIBRARIES = libasm.la
  417. pkginclude_HEADERS = libasm.h
  418. -libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
  419. +libasm_la_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
  420. asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \
  421. asm_newsubscn.c asm_newsym.c asm_newcomsym.c \
  422. asm_newabssym.c \
  423. @@ -51,38 +49,6 @@ libasm_a_SOURCES = asm_begin.c asm_abort
  424. disasm_begin.c disasm_cb.c disasm_end.c disasm_str.c \
  425. symbolhash.c
  426. -libasm_pic_a_SOURCES =
  427. -am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
  428. -
  429. -libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl_pic.a ../libelf/libelf.so ../libdw/libdw.so
  430. -libasm_so_LDLIBS = $(libasm_so_DEPS)
  431. -if USE_LOCKS
  432. -libasm_so_LDLIBS += -lpthread
  433. -endif
  434. -
  435. -libasm_so_LIBS = libasm_pic.a
  436. -libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
  437. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  438. - -Wl,--soname,$@.$(VERSION) \
  439. - -Wl,--version-script,$< \
  440. - $(NO_UNDEFINED) \
  441. - -Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
  442. - $(libasm_so_LDLIBS)
  443. - @$(textrel_check)
  444. - $(AM_V_at)ln -fs $@ $@.$(VERSION)
  445. -
  446. -install: install-am libasm.so
  447. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  448. - $(INSTALL_PROGRAM) libasm.so $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
  449. - ln -fs libasm-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
  450. - ln -fs libasm.so.$(VERSION) $(DESTDIR)$(libdir)/libasm.so
  451. -
  452. -uninstall: uninstall-am
  453. - rm -f $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
  454. - rm -f $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
  455. - rm -f $(DESTDIR)$(libdir)/libasm.so
  456. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  457. -
  458. noinst_HEADERS = libasmP.h symbolhash.h
  459. EXTRA_DIST = libasm.map
  460. --- a/libdwfl/Makefile.am
  461. +++ b/libdwfl/Makefile.am
  462. @@ -34,13 +34,11 @@ AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/.
  463. -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf -I$(builddir)/../debuginfod
  464. VERSION = 1
  465. -noinst_LIBRARIES = libdwfl.a
  466. -noinst_LIBRARIES += libdwfl_pic.a
  467. +noinst_LTLIBRARIES = libdwfl.la
  468. pkginclude_HEADERS = libdwfl.h
  469. -
  470. -libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
  471. +libdwfl_la_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
  472. dwfl_module.c dwfl_report_elf.c relocate.c \
  473. dwfl_module_build_id.c dwfl_module_report_build_id.c \
  474. derelocate.c offline.c segment.c \
  475. @@ -73,24 +71,14 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
  476. gzip.c debuginfod-client.c
  477. if BZLIB
  478. -libdwfl_a_SOURCES += bzip2.c
  479. +libdwfl_la_SOURCES += bzip2.c
  480. endif
  481. if LZMA
  482. -libdwfl_a_SOURCES += lzma.c
  483. +libdwfl_la_SOURCES += lzma.c
  484. endif
  485. if ZSTD
  486. -libdwfl_a_SOURCES += zstd.c
  487. +libdwfl_la_SOURCES += zstd.c
  488. endif
  489. -libdwfl = $(libdw)
  490. -libdw = ../libdw/libdw.so
  491. -libelf = ../libelf/libelf.so
  492. -libebl = ../libebl/libebl.a
  493. -libeu = ../lib/libeu.a
  494. -
  495. -libdwfl_pic_a_SOURCES =
  496. -am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
  497. -
  498. noinst_HEADERS = libdwflP.h
  499. -CLEANFILES += $(am_libdwfl_pic_a_OBJECTS)
  500. --- a/backends/Makefile.am
  501. +++ b/backends/Makefile.am
  502. @@ -34,7 +34,7 @@ endif
  503. AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
  504. -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
  505. -noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
  506. +noinst_LTLIBRARIES = libebl_backends.la
  507. modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
  508. m68k bpf riscv csky loongarch arc
  509. @@ -102,17 +102,13 @@ loongarch_SRCS = loongarch_init.c loonga
  510. arc_SRCS = arc_init.c arc_symbol.c
  511. -libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
  512. +libebl_backends_la_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
  513. $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
  514. $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \
  515. $(ppc64_SRCS) $(s390_SRCS) \
  516. $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) \
  517. $(loongarch_SRCS) $(arc_SRCS)
  518. -libebl_backends_pic_a_SOURCES =
  519. -am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os)
  520. noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
  521. EXTRA_DIST = $(modules:=_reloc.def)
  522. -
  523. -MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS)
  524. --- a/libdwelf/Makefile.am
  525. +++ b/libdwelf/Makefile.am
  526. @@ -34,24 +34,12 @@ AM_CPPFLAGS += -I$(srcdir)/../libelf -I$
  527. -I$(srcdir)/../libdwfl -I$(srcdir)/../libebl
  528. VERSION = 1
  529. -noinst_LIBRARIES = libdwelf.a libdwelf_pic.a
  530. +noinst_LTLIBRARIES = libdwelf.la
  531. pkginclude_HEADERS = libdwelf.h
  532. noinst_HEADERS = libdwelfP.h
  533. -libdwelf_a_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \
  534. +libdwelf_la_SOURCES = dwelf_elf_gnu_debuglink.c dwelf_dwarf_gnu_debugaltlink.c \
  535. dwelf_elf_gnu_build_id.c dwelf_scn_gnu_compressed_size.c \
  536. dwelf_strtab.c dwelf_elf_begin.c \
  537. dwelf_elf_e_machine_string.c
  538. -
  539. -libdwelf = $(libdw)
  540. -
  541. -libdw = ../libdw/libdw.so
  542. -libelf = ../libelf/libelf.so
  543. -libebl = ../libebl/libebl.a
  544. -libeu = ../lib/libeu.a
  545. -
  546. -libdwelf_pic_a_SOURCES =
  547. -am_libdwelf_pic_a_OBJECTS = $(libdwelf_a_SOURCES:.c=.os)
  548. -
  549. -CLEANFILES += $(am_libdwelf_pic_a_OBJECTS)
  550. --- a/libebl/Makefile.am
  551. +++ b/libebl/Makefile.am
  552. @@ -34,9 +34,9 @@ endif
  553. AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm
  554. VERSION = 1
  555. -noinst_LIBRARIES = libebl.a libebl_pic.a
  556. +noinst_LTLIBRARIES = libebl.la
  557. -libebl_a_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
  558. +libebl_la_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
  559. eblsegmenttypename.c eblsectiontypename.c \
  560. eblmachineflagname.c eblsymboltypename.c \
  561. ebldynamictagname.c eblsectionname.c \
  562. @@ -56,9 +56,4 @@ libebl_a_SOURCES = eblopenbackend.c eblc
  563. eblresolvesym.c eblcheckreloctargettype.c \
  564. ebl_data_marker_symbol.c
  565. -libebl_pic_a_SOURCES =
  566. -am_libebl_pic_a_OBJECTS = $(libebl_a_SOURCES:.c=.os)
  567. -
  568. noinst_HEADERS = libebl.h libeblP.h ebl-hooks.h
  569. -
  570. -MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS)
  571. --- a/debuginfod/Makefile.am
  572. +++ b/debuginfod/Makefile.am
  573. @@ -40,23 +40,12 @@ AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/.
  574. program_prefix=
  575. program_transform_name = s,x,x,
  576. -if BUILD_STATIC
  577. -libasm = ../libasm/libasm.a
  578. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  579. -libelf = ../libelf/libelf.a -lz
  580. -if DUMMY_LIBDEBUGINFOD
  581. -libdebuginfod = ./libdebuginfod.a
  582. -else
  583. -libdebuginfod = ./libdebuginfod.a -lpthread $(libcurl_LIBS)
  584. -endif
  585. -else
  586. -libasm = ../libasm/libasm.so
  587. -libdw = ../libdw/libdw.so
  588. -libelf = ../libelf/libelf.so
  589. -libdebuginfod = ./libdebuginfod.so
  590. -endif
  591. -libebl = ../libebl/libebl.a
  592. -libeu = ../lib/libeu.a
  593. +libasm = ../libasm/libasm.la
  594. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  595. +libelf = ../libelf/libelf.la
  596. +libdebuginfod = ./libdebuginfod.la
  597. +libebl = ../libebl/libebl.la
  598. +libeu = ../lib/libeu.la
  599. AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw:.
  600. @@ -76,14 +65,10 @@ debuginfod_find_SOURCES = debuginfod-fin
  601. debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS)
  602. if LIBDEBUGINFOD
  603. -noinst_LIBRARIES = libdebuginfod.a
  604. -noinst_LIBRARIES += libdebuginfod_pic.a
  605. +libdebuginfod_la_SOURCES = debuginfod-client.c
  606. +noinst_LTLIBRARIES = libdebuginfod.la
  607. endif
  608. -libdebuginfod_a_SOURCES = debuginfod-client.c
  609. -libdebuginfod_pic_a_SOURCES = debuginfod-client.c
  610. -am_libdebuginfod_pic_a_OBJECTS = $(libdebuginfod_a_SOURCES:.c=.os)
  611. -
  612. if DUMMY_LIBDEBUGINFOD
  613. AM_CPPFLAGS += -Wno-unused-parameter
  614. endif
  615. @@ -92,42 +77,7 @@ if LIBDEBUGINFOD
  616. pkginclude_HEADERS = debuginfod.h
  617. endif
  618. -if LIBDEBUGINFOD
  619. -libdebuginfod_so_LIBS = libdebuginfod_pic.a
  620. -if DUMMY_LIBDEBUGINFOD
  621. -libdebuginfod_so_LDLIBS =
  622. -else
  623. -libdebuginfod_so_LDLIBS = -lpthread $(libcurl_LIBS) $(fts_LIBS) $(libelf)
  624. -endif
  625. -$(LIBDEBUGINFOD_SONAME): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
  626. - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
  627. - -Wl,--soname,$(LIBDEBUGINFOD_SONAME) \
  628. - -Wl,--version-script,$< \
  629. - $(NO_UNDEFINED) \
  630. - -Wl,--whole-archive $(libdebuginfod_so_LIBS) -Wl,--no-whole-archive \
  631. - $(libdebuginfod_so_LDLIBS)
  632. - @$(textrel_check)
  633. -
  634. -libdebuginfod.so: $(LIBDEBUGINFOD_SONAME)
  635. - ln -fs $< $@
  636. -
  637. -install: install-am libdebuginfod.so
  638. - $(mkinstalldirs) $(DESTDIR)$(libdir)
  639. - $(INSTALL_PROGRAM) $(LIBDEBUGINFOD_SONAME) \
  640. - $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
  641. - ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME)
  642. - ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdebuginfod.so
  643. -
  644. -uninstall: uninstall-am
  645. - rm -f $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
  646. - rm -f $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME)
  647. - rm -f $(DESTDIR)$(libdir)/libdebuginfod.so
  648. - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
  649. -endif
  650. -
  651. EXTRA_DIST = libdebuginfod.map
  652. -MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME)
  653. -CLEANFILES += $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so
  654. # automake std-options override: arrange to pass LD_LIBRARY_PATH
  655. installcheck-binPROGRAMS: $(bin_PROGRAMS)
  656. --- a/lib/Makefile.am
  657. +++ b/lib/Makefile.am
  658. @@ -31,9 +31,9 @@ include $(top_srcdir)/config/eu.am
  659. AM_CFLAGS += $(fpic_CFLAGS)
  660. AM_CPPFLAGS += -I$(srcdir)/../libelf
  661. -noinst_LIBRARIES = libeu.a
  662. +noinst_LTLIBRARIES = libeu.la
  663. -libeu_a_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \
  664. +libeu_la_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \
  665. crc32.c crc32_file.c \
  666. color.c error.c printversion.c
  667. --- a/src/Makefile.am
  668. +++ b/src/Makefile.am
  669. @@ -29,9 +29,9 @@ bin_PROGRAMS = readelf nm size strip elf
  670. elfcmp objdump ranlib strings ar unstrip stack elfcompress \
  671. elfclassify srcfiles
  672. -noinst_LIBRARIES = libar.a
  673. +noinst_LTLIBRARIES = libar.la
  674. -libar_a_SOURCES = arlib.c arlib2.c arlib-argp.c
  675. +libar_la_SOURCES = arlib.c arlib2.c arlib-argp.c
  676. EXTRA_DIST = arlib.h debugpred.h
  677. @@ -39,27 +39,16 @@ bin_SCRIPTS = make-debug-archive
  678. EXTRA_DIST += make-debug-archive.in
  679. CLEANFILES += make-debug-archive
  680. -if BUILD_STATIC
  681. -libasm = ../libasm/libasm.a
  682. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
  683. -libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
  684. +libasm = ../libasm/libasm.la
  685. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
  686. +libelf = ../libelf/libelf.la -lz $(zstd_LIBS)
  687. if LIBDEBUGINFOD
  688. -libdebuginfod = ../debuginfod/libdebuginfod.a -lpthread $(libcurl_LIBS)
  689. +libdebuginfod = ../debuginfod/libdebuginfod.la -lpthread $(libcurl_LIBS)
  690. else
  691. libdebuginfod =
  692. endif
  693. -else
  694. -libasm = ../libasm/libasm.so
  695. -libdw = ../libdw/libdw.so
  696. -libelf = ../libelf/libelf.so
  697. -if LIBDEBUGINFOD
  698. -libdebuginfod = ../debuginfod/libdebuginfod.so
  699. -else
  700. -libdebuginfod =
  701. -endif
  702. -endif
  703. -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
  704. -libeu = ../lib/libeu.a
  705. +libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
  706. +libeu = ../lib/libeu.la
  707. if DEMANGLE
  708. demanglelib = -lstdc++
  709. @@ -87,9 +76,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
  710. addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
  711. elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  712. objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  713. -ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  714. +ranlib_LDADD = libar.la $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  715. strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
  716. -ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  717. +ar_LDADD = libar.la $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
  718. unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
  719. stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
  720. elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
  721. --- a/tests/Makefile.am
  722. +++ b/tests/Makefile.am
  723. @@ -689,17 +689,11 @@ installcheck-local:
  724. TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
  725. LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
  726. -if BUILD_STATIC
  727. -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  728. -libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
  729. -libasm = ../libasm/libasm.a
  730. -else
  731. -libdw = ../libdw/libdw.so
  732. -libelf = ../libelf/libelf.so
  733. -libasm = ../libasm/libasm.so
  734. -endif
  735. -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
  736. -libeu = ../lib/libeu.a
  737. +libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
  738. +libelf = ../libelf/libelf.la
  739. +libasm = ../libasm/libasm.la
  740. +libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
  741. +libeu = ../lib/libeu.la
  742. arextract_LDADD = $(libelf)
  743. arsymtest_LDADD = $(libelf)
  744. --- a/libcpu/Makefile.am
  745. +++ b/libcpu/Makefile.am
  746. @@ -38,19 +38,16 @@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAG
  747. LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
  748. AM_YFLAGS = -p$(<F:parse.y=)
  749. -noinst_LIBRARIES = libcpu.a libcpu_pic.a
  750. +noinst_LTLIBRARIES = libcpu.la
  751. noinst_HEADERS = i386_dis.h i386_mne.h x86_64_dis.h
  752. -libcpu_a_SOURCES = i386_disasm.c x86_64_disasm.c bpf_disasm.c riscv_disasm.c
  753. -
  754. -libcpu_pic_a_SOURCES =
  755. -am_libcpu_pic_a_OBJECTS = $(libcpu_a_SOURCES:.c=.os)
  756. +libcpu_la_SOURCES = i386_disasm.c x86_64_disasm.c bpf_disasm.c riscv_disasm.c
  757. i386_gendis_SOURCES = i386_gendis.c i386_lex.l i386_parse.y
  758. -i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h
  759. -x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h
  760. +$(libcpu_la_OBJECTS): i386.mnemonics $(srcdir)/i386_dis.h
  761. +$(libcpu_la_OBJECTS): x86_64.mnemonics $(srcdir)/x86_64_dis.h
  762. %_defs: $(srcdir)/defs/i386
  763. $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T
  764. @@ -87,20 +84,15 @@ endif
  765. i386_lex_no_Werror = yes
  766. -libeu = ../lib/libeu.a
  767. +libeu = ../lib/libeu.la
  768. i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare \
  769. -Wno-implicit-fallthrough
  770. -i386_parse.o: i386_parse.c i386.mnemonics
  771. -i386_lex.o: i386_parse.h
  772. i386_gendis_LDADD = $(libeu) -lm $(obstack_LIBS)
  773. -i386_parse.h: i386_parse.c ;
  774. -
  775. bpf_disasm_CFLAGS = -Wno-format-nonliteral
  776. EXTRA_DIST = defs/i386
  777. -MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS)
  778. CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics)
  779. MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h)
  780. --- a/config/libelf.pc.in
  781. +++ b/config/libelf.pc.in
  782. @@ -8,7 +8,7 @@ Description: elfutils libelf library to
  783. Version: @VERSION@
  784. URL: http://elfutils.org/
  785. -Libs: -L${libdir} -lelf
  786. +Libs: -L${libdir} -lelf -lz
  787. Cflags: -I${includedir}
  788. Requires.private: zlib @LIBZSTD@
  789. --- a/lib/next_prime.c
  790. +++ b/lib/next_prime.c
  791. @@ -27,6 +27,7 @@
  792. the GNU Lesser General Public License along with this program. If
  793. not, see <http://www.gnu.org/licenses/>. */
  794. +#include <config.h>
  795. #include <stddef.h>
  796. --- a/libebl/eblopenbackend.c
  797. +++ b/libebl/eblopenbackend.c
  798. @@ -198,8 +198,6 @@ static bool default_object_note (const c
  799. uint32_t descsz, const char *desc);
  800. static bool default_debugscn_p (const char *name);
  801. static bool default_copy_reloc_p (int reloc);
  802. -static bool default_none_reloc_p (int reloc);
  803. -static bool default_relative_reloc_p (int reloc);
  804. static bool default_check_special_symbol (Elf *elf,
  805. const GElf_Sym *sym,
  806. const char *name,
  807. @@ -251,8 +249,8 @@ fill_defaults (Ebl *result)
  808. result->object_note = default_object_note;
  809. result->debugscn_p = default_debugscn_p;
  810. result->copy_reloc_p = default_copy_reloc_p;
  811. - result->none_reloc_p = default_none_reloc_p;
  812. - result->relative_reloc_p = default_relative_reloc_p;
  813. + result->none_reloc_p = default_copy_reloc_p;
  814. + result->relative_reloc_p = default_copy_reloc_p;
  815. result->check_special_symbol = default_check_special_symbol;
  816. result->data_marker_symbol = default_data_marker_symbol;
  817. result->check_st_other_bits = default_check_st_other_bits;
  818. @@ -634,8 +632,6 @@ default_copy_reloc_p (int reloc __attrib
  819. {
  820. return false;
  821. }
  822. -strong_alias (default_copy_reloc_p, default_none_reloc_p)
  823. -strong_alias (default_copy_reloc_p, default_relative_reloc_p)
  824. static bool
  825. default_check_special_symbol (Elf *elf __attribute__ ((unused)),
  826. --- a/src/srcfiles.cxx
  827. +++ b/src/srcfiles.cxx
  828. @@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_ve
  829. /* Bug report address. */
  830. ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT;
  831. +#ifdef HAVE_LIBARCHIVE
  832. constexpr size_t BUFFER_SIZE = 8192;
  833. +#endif
  834. /* Definitions of arguments for argp functions. */
  835. static const struct argp_option options[] =