Discussion:
ping [PATCH][LD][MSP430] Fix LD errors when linking LTO debug objects
(too old to reply)
Jozef Lawrynowicz
2018-11-20 23:36:28 UTC
Permalink
ping

When invoking GCC with "-g -flto", the compiler will create LTO objects with
debug information. The objects created are "simple ELF" objects (see
libiberty/simple-object-elf.c) and do not have target-specific sections.

When the MSP430 linker sees one of these objects without a .MSP430.attributes
error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses MSP430X instructions but /tmp/ccynqIwudebugobj uses unknown
error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small code model whereas /tmp/ccynqIwudebugobj uses the unknown code model
error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small data model whereas /tmp/ccynqIwudebugobj uses the unknown data model
error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small code model but /tmp/ccynqIwudebugobj uses the unknown data model
failed to merge target specific data of file /tmp/cc4LhbEI.ltrans0.ltrans.o
The following patch allows these debug LTO objects to be linked with other
MSP430 objects even if they do not have a .MSP430.attributes section.

If the patch is acceptable, I would appreciate if someone would commit it
for me, as I don't have write access.
Nick Clifton
2018-11-21 16:23:09 UTC
Permalink
Hi Jozef,
Post by Jozef Lawrynowicz
ping
Sorry about missing this.
Post by Jozef Lawrynowicz
The following patch allows these debug LTO objects to be linked with other
MSP430 objects even if they do not have a .MSP430.attributes section.
If the patch is acceptable, I would appreciate if someone would commit it
for me, as I don't have write access.
Approved and applied.

Cheers
Nick

Loading...