History log of /freebsd-current/lib/libelf/Makefile
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 9ff084f0 29-Nov-2021 Mark Johnston <markj@FreeBSD.org>

libelf: Link gelf_getchdr.3 to the build

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 573456a9 23-Oct-2020 Ed Maste <emaste@FreeBSD.org>

libelf: add compression header support

GNU and Oracle libelf implementations added support for section
compression, intended to reduce the size of DWARF debug info (which
might be an order of magnitude larger than the code).

There are two compressed ELF section formats:

1. Old GNU - sections are renmaed to start with 'z'. Section contains
a magic number, uncompressed size, and compressed data.

2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag.
The compression header contains the compression type, uncompressed
size, and uncompressed alignment.

The second style is preferred and this change implements only that one.

Submitted by: Tiger Gao <tig@FreeBSDFoundation.org>
Reviewed by: markj
MFC after: 2 weeks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24566


# a7b5a3d48 05-Sep-2019 Emmanuel Vadot <manu@FreeBSD.org>

pkgbase: Put a lot of binaries and lib in FreeBSD-runtime

All of them are needed to be able to boot to single user and be able
to repair a existing FreeBSD installation so put them directly into
FreeBSD-runtime.

Reviewed by: bapt, gjb
Differential Revision: https://reviews.freebsd.org/D21503


# b46517aa 01-Jul-2019 Alex Richardson <arichardson@FreeBSD.org>

Allow bootstrapping elftoolchain on MacOS and Linux

This is required in order to build on non-FreeBSD systems without setting
all the XAR/XSTRINGS/etc. variables

Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D16771


# 9f45c6c1 05-Sep-2018 John Baldwin <jhb@FreeBSD.org>

Add gelf_mips64el.c to the list of files to include in libelf.

Missed in r338478.

Pointy hat to: jhb
Approved by: re (rgrimes)
MFC after: 1 month


# b18d12ba 19-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon


# 2821bdcc 20-Apr-2016 Ed Maste <emaste@FreeBSD.org>

elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree

It's provided by sys.mk so there's no need to derive it from ${.CURDIR}.

Suggested by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5998


# c0e5e7f3 18-Apr-2016 Ed Maste <emaste@FreeBSD.org>

Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain

This produces a nicer path in debug info and build logs.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# a70cba95 04-Feb-2016 Glen Barber <gjb@FreeBSD.org>

First pass through library packaging.

Sponsored by: The FreeBSD Foundation


# e5e23ecc 01-Dec-2015 Bryan Drewery <bdrewery@FreeBSD.org>

Correct r291566 for defining SHLIBDIR.

This must happen before including bsd.own.mk which sets the default to /usr/lib.

X-MFC-With: r291566
Reported by: Max N. Boyarov


# 5a536241 30-Nov-2015 Enji Cooper <ngie@FreeBSD.org>

Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r291406

Tested with the following commands as root:
- yes | make delete-old
- service ldconfig restart
- netstat -nr

X-MFC with: r291406
Reviewed by: jhb, kib
Sponsored by: EMC / Isilon Storage Division


# 4aa63711 25-Nov-2015 Bryan Drewery <bdrewery@FreeBSD.org>

META MODE: Fix 'make bootstrap-tools'.

The main problem was bitrot after elftoolchain being swapped in for the
GNU toolchain.

This also reworks how the list of 'host allowed' libraries is determined
to only allow INTERNALLIBs, which is needed for libelftc to come in.

For usr.bin/readelf use the same hack, as libelf and libdward, to bring in
the needed sys/ headers for host builds. This has not yet been a problem due
to readelf not being built as a host tool in buildworld. This is possible
in the meta build though when building the toolchain.

Sponsored by: EMC / Isilon Storage Division


# b791fbe6 25-Nov-2015 Bryan Drewery <bdrewery@FreeBSD.org>

META MODE: Don't create .meta files when symlinking sources into the obj directory.

Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file. There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by: EMC / Isilon Storage Division


# 88d795a0 21-Jan-2014 Kai Wang <kaiw@FreeBSD.org>

Bump SHLIB_MAJOR for libelf.


# 6eabfa96 21-Jan-2014 Kai Wang <kaiw@FreeBSD.org>

Reapply revisions r237528, r237531 and r238741 which make libelf
properly include sys/ headers from the source tree instead of the
host.

These patches are also applied to libdwarf since libdwarf requires
the same sys/ headers as libelf.


# a1abeb05 21-Jan-2014 Kai Wang <kaiw@FreeBSD.org>

Remove INCSDIR variable which is only used in elftoolchain's own build
framework.


# 7c4a6907 15-Jan-2014 Kai Wang <kaiw@FreeBSD.org>

Set CFLAGS in just one line.


# edbef29b 15-Jan-2014 Kai Wang <kaiw@FreeBSD.org>

Removed source code for the old libelf and build the new libelf from
contrib/ instead.


# 7066cac0 24-Jul-2012 Andrey A. Chernov <ache@FreeBSD.org>

Don't ever build files depending on the directory where they are placed in.
It is obvious that its modification time will change with each such file
builded.
This bug cause whole libelf to rebuild itself each second make run
(and relink that files on each first make run) in the loop.


# 6b14dddf 24-Jun-2012 Andrew Turner <andrew@FreeBSD.org>

Add the sys directory we create to the list of items to clean.


# ec280fdb 24-Jun-2012 Andrew Turner <andrew@FreeBSD.org>

Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h.

When building libelf in the bootstrap stage this would include the tree
versions of, for example, sys/_types.h. This would work as long as the
tree's version of this file was close enough to the system's version of
the file. If, however, there was a change in the tree such that the location
of a typedef was moved this would cause problems. In this case the version
of sys/_types.h in the tree no longer defines __wchar_t and expects it to
to be defined in machine/_types.h, however we pick up machine/_types.h from
the system and find it is not defined there. The solution is to restrict the
parts of sys er include from the tree to those that are needed.

This fixes the recent Tinderbox failure.

Pointy Hat to: andrew


# 9b2a96cc 06-May-2011 David E. O'Brien <obrien@FreeBSD.org>

Add the ability to search for all the inlined instances of a given function.

Reviewed by: jb
Obtained from: Juniper Networks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 029a7373 21-Aug-2010 Rui Paulo <rpaulo@FreeBSD.org>

Don't link drti.o with libelf_pic.a. This means that all software with
userland SDT probes must be linked with libelf explicitly.

Requested by: kib
Sponsored by: The FreeBSD Foundation


# 9329096b 21-Aug-2010 Rui Paulo <rpaulo@FreeBSD.org>

Install a PIC libelf. This will be needed by the DTrace runtime
instrumentation object (dtri.o).

Sponsored by: The FreeBSD Foundation


# d961c5b4 20-Jul-2010 Kai Wang <kaiw@FreeBSD.org>

Move helper functions `_libelf_ar_get_{name,number,string}()` and
`_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
to break the circular dependency between "elf_memory.o" and
"libelf_ar.o".

Obtained from: elftoolchain
MFC after: 1 month


# 86f5401b 20-Jul-2010 Kai Wang <kaiw@FreeBSD.org>

* Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
respectively.
* Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
`elf_getshdrnum()`.
* Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
`elf_getshnum()`.

Obtained from: elftoolchain
MFC after: 1 month


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# daaf5759 02-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.


# 449c7072 11-Mar-2009 David E. O'Brien <obrien@FreeBSD.org>

Don't need to set symbol, default value is OK.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# f6c0f35e 24-Dec-2006 Joseph Koshy <jkoshy@FreeBSD.org>

Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx'
members of the ELF Executable Header inside the library-private
`struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr
structure on an elf_update(3) call. These fields of the Ehdr
structure are technically `out of bounds' for an application program
per the ELF(3) API, but we've seen applications that initialize
a new Ehdr structure using memcpy(), messing up the library's
invariants. [1]

Implement elf_getphnum() and handle ELF objects with more than
64K program header table entries.

Reported by: jb [1]


# 2dacb27e 17-Dec-2006 Joseph Koshy <jkoshy@FreeBSD.org>

Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled. Change the M4
templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair
around the generated code for each ELF data type, where `NNN' is
the OS version where the ELF type was added to the source tree.

This change allows cross-builds of old sources on newer FreeBSD
systems to work correctly.

Problem reported by: ru


# 73eee246 23-Nov-2006 Ruslan Ermilov <ru@FreeBSD.org>

- style: use `=' instead of `+=' for initial assignments.

- don't add generated sources' objects to OBJS explicitly;
GENSRCS is part of SRCS so they were already in OBJS.


# 9167cd63 12-Nov-2006 Joseph Koshy <jkoshy@FreeBSD.org>

- Replace the use of DPSRCS with something more appropriate. DPSRCS
is for when you need something in ".depend", but not compiled in.
- Style fixes: Spell ${.OBJDIR} as ".".
- Neaten a comment.

Submitted by: ru


# 3eb1a62e 11-Nov-2006 Joseph Koshy <jkoshy@FreeBSD.org>

MFP4: Add an implementation of the ELF(3) and GELF(3) API set.

Bump __FreeBSD_version.

Reviewed by: jb