GreenHills linker can't find module in static library

0

In a linker layout script (*.ld) I have something like this:

.data_Secure align(16) : AT(___IDAT_Secure)
{
    "libBase.a(Csm.o(.data))" "libBase.a(Csm.o(.sdata))" "libBase.a(Csm.o(.zdata))"
    ...
}

but the GHS linker keeps giving me warnings:

[elxr] (warning) section libBase.a(Csm.o)(.data)  is not being included; module libBase.a(Csm.o) is not part of this link

[elxr] (warning) section libBase.a(Csm.o)(.sdata) is not being included; module libBase.a(Csm.o) is not part of this link

[elxr] (warning) section libBase.a(Csm.o)(.zdata) is not being included; module libBase.a(Csm.o) is not part of this link

while I'm pretty sure module Csm.o is part of the libBase.a. When I peek into the library I see this:

$ objdump -x libBase.a | grep -A 100 Csm.o | less
Csm.o:     file format elf32-little
rw-rw-rw- 0/0  61304 Apr 30 14:27 2019 Csm.o
architecture: UNKNOWN!, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x00000000

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000030  00000000  00000000  00000034  2**1
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000000  00000000  00000000  00000000  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000000  00000000  00000000  00000000  2**0
                  ALLOC
  3 .debug_info   00000293  00000000  00000000  00000064  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
  4 .debug_abbrev 0000008f  00000000  00000000  000002f7  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_line   00002c8a  00000000  00000000  00000386  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
  6 .debug_macinfo 0000aae1  00000000  00000000  00003010  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_frame  000000ac  00000000  00000000  0000daf1  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
  8 .note.renesas 00000028  00000000  00000000  0000db9d  2**0
                  CONTENTS, READONLY
  9 .ghsinfo      00000048  00000000  00000000  0000dbc5  2**0
                  CONTENTS, READONLY

If something, I would expect warning:

[elxr] (warning) section libBase.a(Csm.o)(.data) is not being included; section .data appears to be empty

or similar. Does any one have experience why the linker can not locate the module inside the library?

c
linker
linker-scripts
linker-warning
greenhills
asked on Stack Overflow May 16, 2019 by Peter Silon

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0