Skip to content

Commit 5cbe414

Browse files
MBODAPATalpsayin
authored andcommitted
microblaze: Compiler will give error messages in more detail for mxl-gp-opt flag..
Signed-off-by: Aayush Misra <aayushm@amd.com> Patchfile taken from: https: //github.com/Xilinx/meta-xilinx/blob/1d98f8981e3157aa265ca141a0fc9e6e2640394f/meta-microblaze/recipes-devtools/binutils/binutils/0018-Compiler-will-give-error-messages-in-more-detail-for.patch Signed-off-by: Alp Sayin <alpsayin@gmail.com>
1 parent 2a9b576 commit 5cbe414

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ld/ldmain.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,18 @@ reloc_overflow (struct bfd_link_info *info,
16081608
break;
16091609
case bfd_link_hash_defined:
16101610
case bfd_link_hash_defweak:
1611+
1612+
if((strcmp(reloc_name,"R_MICROBLAZE_SRW32") == 0) && entry->type == bfd_link_hash_defined)
1613+
{
1614+
einfo (_(" relocation truncated to fit: don't enable small data pointer optimizations[mxl-gp-opt] if extern or multiple declarations used: "
1615+
"%s against symbol `%T' defined in %A section in %B"),
1616+
reloc_name, entry->root.string,
1617+
entry->u.def.section,
1618+
entry->u.def.section == bfd_abs_section_ptr
1619+
? info->output_bfd : entry->u.def.section->owner);
1620+
break;
1621+
}
1622+
16111623
einfo (_(" relocation truncated to fit: "
16121624
"%s against symbol `%pT' defined in %pA section in %pB"),
16131625
reloc_name, entry->root.string,

0 commit comments

Comments
 (0)