ich eine Speicher Linker-Skript erstellt und gespeichert als memory.ld in der Eclipse-IDE-: Projekt: Eigenschaften: gcc-Linker: Sonstiges: hinzugefügt I -M -TWie löst man den Fehler im Linker-Skript?
memory.ld memory.ld:
MEMORY
{
ram (rw) : ORIGIN = 0x4000000 , LENGTH = 2M
}
SECTIONS
{
RAM : { *(.myvarloc)
} > ram }
In meinem c-Programm: habe ich eine globale Erklärung wie:
__attribute__ ((section(".myvarloc")))
uint8 measurements [30];
FEHLER:
/usr/bin/ld: FEBRUARY section `.text' will not fit in region `ram'
/usr/bin/ld: region `ram' overflowed by 20018 bytes
/usr/lib/i386-linux-gnu/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
(.text+0x2b): undefined reference to `__init_array_end'
/usr/lib/i386-linux-gnu/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
(.text+0x31): undefined reference to `__init_array_start'
/usr/lib/i386-linux-gnu/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
(.text+0x57): undefined reference to `__init_array_start'
/usr/bin/ld: FEBRUARY: hidden symbol `__init_array_end' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Der Fehler betrifft '.text' /' ram' nicht '.myvarloc' Überlauf. – anishsane
Ihr Linker-Skript muss wahrscheinlich dem Linker sagen, was mit dem Rest des Codes/Daten/etc zu tun, nicht nur, was mit dem .myvarloc Abschnitt – nos
zu tun, vielen Dank für die Antwort. Könnten Sie mir bitte ein Beispiel geben ?? – user3252048