Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 1 | From 1b8f6099c5f85d77ef666becff1c4edd0aa724ab Mon Sep 17 00:00:00 2001 |
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Wed, 21 Feb 2018 12:32:02 +0530 |
| 4 | Subject: [PATCH] Compiler will give error messages in more detail for |
| 5 | mxl-gp-opt flag.. |
| 6 | |
| 7 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
| 8 | Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 9 | |
| 10 | --- |
| 11 | ld/ldmain.c | 12 ++++++++++++ |
| 12 | 1 file changed, 12 insertions(+) |
| 13 | |
| 14 | diff --git a/ld/ldmain.c b/ld/ldmain.c |
| 15 | index 725512f..2ed413a 100644 |
| 16 | --- a/ld/ldmain.c |
| 17 | +++ b/ld/ldmain.c |
| 18 | @@ -1448,6 +1448,18 @@ reloc_overflow (struct bfd_link_info *info, |
| 19 | break; |
| 20 | case bfd_link_hash_defined: |
| 21 | case bfd_link_hash_defweak: |
| 22 | + |
| 23 | + if((strcmp(reloc_name,"R_MICROBLAZE_SRW32") == 0) && entry->type == bfd_link_hash_defined) |
| 24 | + { |
| 25 | + einfo (_(" relocation truncated to fit: don't enable small data pointer optimizations[mxl-gp-opt] if extern or multiple declarations used: " |
| 26 | + "%s against symbol `%T' defined in %A section in %B"), |
| 27 | + reloc_name, entry->root.string, |
| 28 | + entry->u.def.section, |
| 29 | + entry->u.def.section == bfd_abs_section_ptr |
| 30 | + ? info->output_bfd : entry->u.def.section->owner); |
| 31 | + break; |
| 32 | + } |
| 33 | + |
| 34 | einfo (_(" relocation truncated to fit: " |
| 35 | "%s against symbol `%pT' defined in %pA section in %pB"), |
| 36 | reloc_name, entry->root.string, |