[Rpm-maint] [Suse patch] Make debugedit build without dwarf.h
Mark Hatle
mark.hatle at windriver.com
Wed May 23 14:43:43 UTC 2007
Originally only the libelf chunks had a license provision for linking w/
GPL code. As you noticed, switching to 0.97.1 and above relicensed ALL
of the code to GPL v2 so the license issues are resolved (as far as I know).
The attached patch should not be necessary if you have a full version of
elfutils, or the compatible dwarf.h information.
--Mark
Panu Matilainen wrote:
>
> The ppc logic bug has already been fixed in rpm.org tree.
>
> As for the dwarf.h part, I'm a bit curious. On RHEL/Fedora the dwarf.h
> header comes from elfutils(-devel) but that's not present in the
> elfutils-0.97 version bundled inside Suse rpm as if it was removed from
> the tarball deliberately. Somebody care to comment what's the deal here?
>
> I seem to have a vague recollection of some licensing issue wrt
> elfutils, and indeed 0.97.1 says "0.97 code re-released under GPLv2", is
> this perhaps somehow related?
>
> - Panu -
>
> ---
>
> Make debugedit build without dwarf.h. Also fixes a logic bug for ppc.
>
> --- ./tools/debugedit.c.orig 2005-12-15 14:28:49.000000000 +0000
> +++ ./tools/debugedit.c 2006-03-17 13:01:53.000000000 +0000
> @@ -34,7 +34,37 @@
> #include <popt.h>
>
> #include <gelf.h>
> -#include <dwarf.h>
> +
> +
> +/* some defines taken from the dwarf standard */
> +
> +#define DW_TAG_compile_unit 0x11
> +
> +#define DW_AT_name 0x03
> +#define DW_AT_stmt_list 0x10
> +#define DW_AT_comp_dir 0x1b
> +
> +#define DW_FORM_addr 0x01
> +#define DW_FORM_block2 0x03
> +#define DW_FORM_block4 0x04
> +#define DW_FORM_data2 0x05
> +#define DW_FORM_data4 0x06
> +#define DW_FORM_data8 0x07
> +#define DW_FORM_string 0x08
> +#define DW_FORM_block 0x09
> +#define DW_FORM_block1 0x0a
> +#define DW_FORM_data1 0x0b
> +#define DW_FORM_flag 0x0c
> +#define DW_FORM_sdata 0x0d
> +#define DW_FORM_strp 0x0e
> +#define DW_FORM_udata 0x0f
> +#define DW_FORM_ref_addr 0x10
> +#define DW_FORM_ref1 0x11
> +#define DW_FORM_ref2 0x12
> +#define DW_FORM_ref4 0x13
> +#define DW_FORM_ref8 0x14
> +#define DW_FORM_ref_udata 0x15
> +#define DW_FORM_indirect 0x16
>
> #include "hashtab.h"
>
> @@ -1039,7 +1069,7 @@ edit_dwarf2 (DSO *dso)
> break;
> case EM_PPC:
> case EM_PPC64:
> - if (rtype != R_PPC_ADDR32 || rtype != R_PPC_UADDR32)
> + if (rtype != R_PPC_ADDR32 && rtype != R_PPC_UADDR32)
> goto fail;
> break;
> case EM_S390:
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint
More information about the Rpm-maint
mailing list