From patchwork Wed Dec 19 23:43:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Fr=C3=B6berg?= X-Patchwork-Id: 207566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 5877B2C008C for ; Thu, 20 Dec 2012 10:45:12 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 60FBB2E19A; Wed, 19 Dec 2012 23:45:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ly+4cS9EX4Uc; Wed, 19 Dec 2012 23:45:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E11B62E1B9; Wed, 19 Dec 2012 23:44:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CD1DC8F753 for ; Wed, 19 Dec 2012 23:44:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3D9E78109C for ; Wed, 19 Dec 2012 23:44:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zFueMY5wudBX for ; Wed, 19 Dec 2012 23:44:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.petroprogram.com (mail.petroprogram.com [194.89.34.74]) by whitealder.osuosl.org (Postfix) with ESMTPS id C04C58109D for ; Wed, 19 Dec 2012 23:44:21 +0000 (UTC) Received: from localhost.fi (unknown [194.89.34.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan.froberg@petroprogram.com) by mail.petroprogram.com (Postfix) with ESMTPSA id DEC024FAC6; Thu, 20 Dec 2012 01:34:48 +0200 (EET) From: =?UTF-8?q?Stefan=20Fr=C3=B6berg?= To: buildroot@busybox.net Date: Thu, 20 Dec 2012 01:43:46 +0200 Message-Id: <1355960630-25089-8-git-send-email-stefan.froberg@petroprogram.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1355960630-25089-1-git-send-email-stefan.froberg@petroprogram.com> References: <1355960630-25089-1-git-send-email-stefan.froberg@petroprogram.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 08/12] elfutils: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net ld binary from elfutils wants to use DL_CALL_FCT(). AFAIK, this is just some nonstandard, callback wrapper. Converting to normal stuff. Signed-off-by: Stefan Fröberg --- package/elfutils/elfutils-ld.patch | 144 ++++++++++++++++++++++++++++++++++++ 1 files changed, 144 insertions(+), 0 deletions(-) create mode 100644 package/elfutils/elfutils-ld.patch diff --git a/package/elfutils/elfutils-ld.patch b/package/elfutils/elfutils-ld.patch new file mode 100644 index 0000000..ccbf8b8 --- /dev/null +++ b/package/elfutils/elfutils-ld.patch @@ -0,0 +1,144 @@ +--- elfutils-0.155.org/src/ld.h 2012-10-03 23:22:25.403785882 +0300 ++++ elfutils-0.155_backup/src/ld.h 2012-12-04 18:56:18.872566578 +0200 +@@ -291,7 +291,7 @@ + const char **(*lib_extensions) (struct ld_state *) + __attribute__ ((__const__)); + #define LIB_EXTENSION(state) \ +- DL_CALL_FCT ((state)->callbacks.lib_extensions, (state)) ++ (state)->callbacks.lib_extensions(state) + + /* Process the given file. If the file is not yet open, open it. + The first parameter is a file descriptor for the file which can +@@ -302,12 +302,12 @@ + int (*file_process) (int fd, struct usedfiles *, struct ld_state *, + struct usedfiles **); + #define FILE_PROCESS(fd, file, state, nextp) \ +- DL_CALL_FCT ((state)->callbacks.file_process, (fd, file, state, nextp)) ++ (state)->callbacks.file_process(fd, file, state, nextp) + + /* Close the given file. */ + int (*file_close) (struct usedfiles *, struct ld_state *); + #define FILE_CLOSE(file, state) \ +- DL_CALL_FCT ((state)->callbacks.file_close, (file, state)) ++ (state)->callbacks.file_close(file, state) + + /* Create the output sections now. This requires knowledge about + all the sections we will need. It may be necessary to sort the +@@ -319,99 +319,97 @@ + output routines. */ + void (*create_sections) (struct ld_state *); + #define CREATE_SECTIONS(state) \ +- DL_CALL_FCT ((state)->callbacks.create_sections, (state)) ++ (state)->callbacks.create_sections(state) + + /* Determine whether we have any non-weak unresolved references left. */ + int (*flag_unresolved) (struct ld_state *); + #define FLAG_UNRESOLVED(state) \ +- DL_CALL_FCT ((state)->callbacks.flag_unresolved, (state)) ++ (state)->callbacks.flag_unresolved(state) + + /* Create the sections which are generated by the linker and are not + present in the input file. */ + void (*generate_sections) (struct ld_state *); + #define GENERATE_SECTIONS(state) \ +- DL_CALL_FCT ((state)->callbacks.generate_sections, (state)) ++ (state)->callbacks.generate_sections(state) + + /* Open the output file. The file name is given or "a.out". We + create as much of the ELF structure as possible. */ + int (*open_outfile) (struct ld_state *, int, int, int); + #define OPEN_OUTFILE(state, machine, class, data) \ +- DL_CALL_FCT ((state)->callbacks.open_outfile, (state, machine, class, data)) ++ (state)->callbacks.open_outfile(state, machine, class, data) + + /* Create the data for the output file. */ + int (*create_outfile) (struct ld_state *); + #define CREATE_OUTFILE(state) \ +- DL_CALL_FCT ((state)->callbacks.create_outfile, (state)) ++ (state)->callbacks.create_outfile(state) + + /* Process a relocation section. */ + void (*relocate_section) (struct ld_state *, Elf_Scn *, struct scninfo *, + const Elf32_Word *); + #define RELOCATE_SECTION(state, outscn, first, dblindirect) \ +- DL_CALL_FCT ((state)->callbacks.relocate_section, (state, outscn, first, \ +- dblindirect)) ++ (state)->callbacks.relocate_section(state, outscn, first, dblindirect) + + /* Allocate a data buffer for the relocations of the given output + section. */ + void (*count_relocations) (struct ld_state *, struct scninfo *); + #define COUNT_RELOCATIONS(state, scninfo) \ +- DL_CALL_FCT ((state)->callbacks.count_relocations, (state, scninfo)) ++ (state)->callbacks.count_relocations(state, scninfo) + + /* Create relocations for executable or DSO. */ + void (*create_relocations) (struct ld_state *, const Elf32_Word *); + #define CREATE_RELOCATIONS(state, dlbindirect) \ +- DL_CALL_FCT ((state)->callbacks.create_relocations, (state, dblindirect)) ++ (state)->callbacks.create_relocations(state, dblindirect) + + /* Finalize the output file. */ + int (*finalize) (struct ld_state *); + #define FINALIZE(state) \ +- DL_CALL_FCT ((state)->callbacks.finalize, (state)) ++ (state)->callbacks.finalize(state) + + /* Check whether special section number is known. */ + bool (*special_section_number_p) (struct ld_state *, size_t); + #define SPECIAL_SECTION_NUMBER_P(state, number) \ +- DL_CALL_FCT ((state)->callbacks.special_section_number_p, (state, number)) ++ (state)->callbacks.special_section_number_p(state, number) + + /* Check whether section type is known. */ + bool (*section_type_p) (struct ld_state *, XElf_Word); + #define SECTION_TYPE_P(state, type) \ +- DL_CALL_FCT ((state)->callbacks.section_type_p, (state, type)) ++ (state)->callbacks.section_type_p(state, type) + + /* Return section flags for .dynamic section. */ + XElf_Xword (*dynamic_section_flags) (struct ld_state *); + #define DYNAMIC_SECTION_FLAGS(state) \ +- DL_CALL_FCT ((state)->callbacks.dynamic_section_flags, (state)) ++ (state)->callbacks.dynamic_section_flags(state) + + /* Create the data structures for the .plt section and initialize it. */ + void (*initialize_plt) (struct ld_state *, Elf_Scn *scn); + #define INITIALIZE_PLT(state, scn) \ +- DL_CALL_FCT ((state)->callbacks.initialize_plt, (state, scn)) ++ (state)->callbacks.initialize_plt(state, scn) + + /* Create the data structures for the .rel.plt section and initialize it. */ + void (*initialize_pltrel) (struct ld_state *, Elf_Scn *scn); + #define INITIALIZE_PLTREL(state, scn) \ +- DL_CALL_FCT ((state)->callbacks.initialize_pltrel, (state, scn)) ++ (state)->callbacks.initialize_pltrel(state, scn) + + /* Finalize the .plt section the what belongs to them. */ + void (*finalize_plt) (struct ld_state *, size_t, size_t, struct symbol **); + #define FINALIZE_PLT(state, nsym, nsym_dyn, ndxtosym) \ +- DL_CALL_FCT ((state)->callbacks.finalize_plt, (state, nsym, nsym_dyn, \ +- ndxtosym)) ++ (state)->callbacks.finalize_plt(state, nsym, nsym_dyn, ndxtosym) + + /* Create the data structures for the .got section and initialize it. */ + void (*initialize_got) (struct ld_state *, Elf_Scn *scn); + #define INITIALIZE_GOT(state, scn) \ +- DL_CALL_FCT ((state)->callbacks.initialize_got, (state, scn)) ++ (state)->callbacks.initialize_got(state, scn) + + /* Create the data structures for the .got.plt section and initialize it. */ + void (*initialize_gotplt) (struct ld_state *, Elf_Scn *scn); + #define INITIALIZE_GOTPLT(state, scn) \ +- DL_CALL_FCT ((state)->callbacks.initialize_gotplt, (state, scn)) ++ (state)->callbacks.initialize_gotplt(state, scn) + + /* Return the tag corresponding to the native relocation type for + the platform. */ + int (*rel_type) (struct ld_state *); + #define REL_TYPE(state) \ +- DL_CALL_FCT ((state)->callbacks.rel_type, (state)) ++ (state)->callbacks.rel_type(state) + }; + +