freebsd-nq/contrib/elftoolchain/libdwarf
Mark Johnston 3aa0bc89c6 libdwarf: Add a weak uncompress() symbol
This works around brokenness in buildworld's bootstrapping logic: it
uses the source tree's metadata to collect dependency info (such as,
"libdwarf depends on libz") but links against static host libraries.
If these two are out of sync, as is the case if one builds a commit
prior to the introduction of the libz dependency, then the build fails
when trying to statically link nm(1).

Mitigate the problem by defining a weak uncompress() symbol which simply
returns an error.  This ensures that the build won't fail when
statically linking libdwarf without zlib.  The downside is that any
tools using libdwarf without zlib will now hit a runtime error if they
attempt to decode compressed sections, but at least they'll fail
deterministically, and compressed debug info is only enabled by default
in main.

In particular, this fixes building of branches lacking commit
dbf05458e3, such as releng branches, stable/12 and 13 and old
revisions of main.  Previously the nm(1) build would fail with:

ld: error: undefined symbol: uncompress
>>> referenced by libdwarf_elf_init.c:233
>>> (/usr/src/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c:233)
>>>               libdwarf_elf_init.o:(_dwarf_elf_init) in archive
>>> /usr/lib/libdwarf.a

Reported by:	dim, ler, krion
Reviewed by:	imp, emaste
Fixes:		dbf05458e3 ("libdwarf: Support consumption of compressed ELF sections")
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33419
2021-12-13 18:47:15 -05:00
..
_libdwarf.h libdwarf: Support consumption of compressed ELF sections 2021-12-06 10:37:49 -05:00
dwarf_abbrev.c
dwarf_add_arange.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_comp_dir.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_const_value_string.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_dataref.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_flag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_location_expr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_name.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_producer.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_ref_address.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_reference.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_signed_const.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_string.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_AT_targ_address.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_die_to_debug.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_directory_decl.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_expr_addr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_expr_gen.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_fde_inst.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_file_decl.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_frame_cie.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_frame_fde.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_funcname.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_line_entry.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_pubname.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_typename.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_varname.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_add_weakname.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_arange.c
dwarf_attr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_attr.c
dwarf_attrlist.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_attroffset.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_attrval_signed.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_attrval.c
dwarf_child.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_cu.c
dwarf_dealloc.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_dealloc.c
dwarf_def_macro.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_die_abbrev_code.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_die_link.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_die.c
dwarf_diename.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_dieoffset.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_dump.c Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
dwarf_end_macro_file.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_errmsg.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_errmsg.c
dwarf_errno.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_expand_frame_instructions.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_expr_current_offset.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_expr_into_block.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_fde_cfa_offset.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_find_macro_value_start.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_finish.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_finish.c
dwarf_form.c
dwarf_formaddr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formblock.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formexprloc.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formflag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formref.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formsig8.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formstring.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_formudata.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_frame.c
dwarf_funcs.m4
dwarf_get_abbrev_children_flag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_abbrev_code.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_abbrev_entry.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_abbrev_tag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_abbrev.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_address_size.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_arange_info.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_arange.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_aranges.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_AT_name.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_cie_index.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_cie_info.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_cie_of_fde.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_cu_die_offset.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_die_infotypes_flag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_elf.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_at_pc.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_info_for_all_regs3.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_info_for_all_regs.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_info_for_cfa_reg3.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_info_for_reg3.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_info_for_reg.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_instr_bytes.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_list.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_n.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_fde_range.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_form_class.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_funcs.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_globals.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_loclist_entry.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_macro_details.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_pubtypes.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_ranges.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_relocation_info_count.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_relocation_info.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_section_bytes.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_section_max_offsets.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_str.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_types.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_vars.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_get_weaks.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_hasattr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_hasform.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_highpc.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_init.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_init.c
dwarf_lineno.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_lineno.c
dwarf_lne_end_sequence.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_lne_set_address.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_loclist_from_expr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_loclist.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_loclist.c
dwarf_macinfo.c
dwarf_nametbl.m4
dwarf_new_die.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_new_expr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_new_fde.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_next_cu_header.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_next_types_section.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_object_init.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_pro_arange.c
dwarf_pro_attr.c libdwarf: Fix a possible memory leak in dwarf_add_AT_location_expr(). 2020-02-04 21:14:53 +00:00
dwarf_pro_die.c
dwarf_pro_expr.c libdwarf: Remove unnecessary NULL checks. 2020-02-04 21:14:34 +00:00
dwarf_pro_finish.c
dwarf_pro_frame.c
dwarf_pro_funcs.m4
dwarf_pro_init.c
dwarf_pro_lineno.c
dwarf_pro_macinfo.c
dwarf_pro_nametbl.m4
dwarf_pro_pubnames.m4
dwarf_pro_reloc.c
dwarf_pro_sections.c
dwarf_pro_types.m4
dwarf_pro_vars.m4
dwarf_pro_weaks.m4
dwarf_producer_init.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_producer_set_isa.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_pubnames.m4
dwarf_pubtypes.m4
dwarf_ranges.c
dwarf_reloc.c
dwarf_reset_section_bytes.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_sections.c
dwarf_set_frame_cfa_value.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_set_reloc_application.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_seterrarg.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_seterror.c
dwarf_srcfiles.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_srclines.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_start_macro_file.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_str.c
dwarf_tag.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_transform_to_disk_form.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_types.m4
dwarf_undef_macro.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_vars.m4
dwarf_vendor_ext.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf_weaks.m4
dwarf_whatattr.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf.3 Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
dwarf.h Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
libdwarf_abbrev.c libdwarf: Make an out-pointer of _dwarf_abbrev_add() mandatory. 2020-02-04 21:15:11 +00:00
libdwarf_arange.c
libdwarf_attr.c Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
libdwarf_die.c libdwarf: Make an out-pointer assignment unconditional. 2020-03-20 16:24:06 +00:00
libdwarf_elf_access.c
libdwarf_elf_init.c libdwarf: Fix error handling in _dwarf_elf_init() 2021-12-13 18:46:59 -05:00
libdwarf_error.c
libdwarf_frame.c libdwarf: Fix a memory leak in _dwarf_frame_section_init(). 2020-02-04 21:15:29 +00:00
libdwarf_info.c
libdwarf_init.c
libdwarf_lineno.c Prepend DW_AT_comp_dir to relative line number directory table entries. 2019-03-27 19:32:21 +00:00
libdwarf_loc.c
libdwarf_loclist.c
libdwarf_macinfo.c
libdwarf_nametbl.c
libdwarf_ranges.c
libdwarf_reloc.c Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
libdwarf_rw.c
libdwarf_sections.c
libdwarf_str.c
libdwarf.c
libdwarf.h libdwarf: Support consumption of compressed ELF sections 2021-12-06 10:37:49 -05:00
Makefile
os.NetBSD.mk
Version.map
zlib_stub.c libdwarf: Add a weak uncompress() symbol 2021-12-13 18:47:15 -05:00