From 521af04d853361b49344b61892eb0618f9f713c5 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:36 -0500 Subject: Conditionally perform common relocation fixups Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser --- common/serial.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/serial.c') diff --git a/common/serial.c b/common/serial.c index 41a24c2fad..b4db46b165 100644 --- a/common/serial.c +++ b/common/serial.c @@ -81,12 +81,14 @@ struct serial_device *default_serial_console(void) __attribute__((weak, alias("_ int serial_register (struct serial_device *dev) { +#ifndef CONFIG_RELOC_FIXUP_WORKS dev->init += gd->reloc_off; dev->setbrg += gd->reloc_off; dev->getc += gd->reloc_off; dev->tstc += gd->reloc_off; dev->putc += gd->reloc_off; dev->puts += gd->reloc_off; +#endif dev->next = serial_devices; serial_devices = dev; -- cgit v1.2.1