This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[google][4.6]Bug fix to function reordering plugin to check presence of elf.h


function_reordering_plugin.c includes <elf.h> which is not available
on non-ELF platforms building a cross-compiler. This patch checks for
<elf.h> before including it. Otherwise, it redefines the macros used.
This is safe because the macros will not change.

For context, this linker plugin itself is only available in the google
4_6 branch and I will port it to other branches and make it available
for review for trunk soon.


2012-02-24  Sriraman Tallam  <tmsriram@google.com>

	* function_reordering_plugin.c: Check for presence of elf.h.
	Otherwise, redefine the elf macros used.

Ok to commit?

Thanks,
-Sri.

Attachment: plugin_patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]