This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 04/12] bfd/ * bfd/elf32-microblaze.c: Correct adjustment of global symbols
On 10/10/2012 11:05 AM, Mike Frysinger wrote:
On Tuesday 09 October 2012 22:13:57 david.holsgrove@xilinx.com wrote:
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -1256,6 +1256,31 @@ microblaze_elf_relocate_section (bfd *output_bfd,
/* Calculate fixup value for reference. */
+#define D(x)
i'm not sure if we have a debugging facility in bfd already, but assuming we
don't, write this instead as:
#define D(x) do { if (0) x; } while (0)
that way the code will always get compiled and you'll notice problems in the
message over time as code changes.
Bfd has very little debugging code, but there is an example in bfdwin.c. This
uses a global symbol which can be set by a debugger to enable debug output. A
better method is to enable this by a command line option, but this may not be
as practical for bfd, which is used by several components.
If the debug code is really necessary, it should not require someone
to modify the file to enable it.
I think that this is development code and is not needed.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077