mirror of
https://github.com/rtlduino/RTL8710AF_GCC.git
synced 2025-07-31 20:21:04 +00:00
motify compile link error
motify compile link error
This commit is contained in:
parent
923914edae
commit
03e74a8e50
5418 changed files with 1367914 additions and 206149 deletions
|
|
@ -0,0 +1,22 @@
|
|||
# aem-validation.specs
|
||||
#
|
||||
# Spec file for AArch32 A profile baremetal newlib, libgloss on
|
||||
# VALIDATION platform with AngelAPI semi-hosting.
|
||||
#
|
||||
# This Spec file is also appropriate for the foundation model.
|
||||
|
||||
%rename link old_link
|
||||
|
||||
*link:
|
||||
--defsym=_rdimon_vector_base=0x00000000 -Ttext-segment=0x00008000 %(old_link)
|
||||
|
||||
%rename lib libc
|
||||
|
||||
*libgloss:
|
||||
-lrdimon
|
||||
|
||||
*lib:
|
||||
cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# aem-ve.specs
|
||||
#
|
||||
# Spec file for AArch32 A profile baremetal newlib, libgloss on VE platform with AngelAPI
|
||||
# semi-hosting.
|
||||
#
|
||||
# This Spec file is also appropriate for the foundation model.
|
||||
|
||||
%rename link old_link
|
||||
|
||||
*link:
|
||||
--defsym=_rdimon_vector_base=0x80000000 -Ttext-segment=0x80008000 %(old_link)
|
||||
|
||||
%rename lib libc
|
||||
|
||||
*libgloss:
|
||||
-lrdimon
|
||||
|
||||
*lib:
|
||||
cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
%rename link old_link
|
||||
|
||||
*link:
|
||||
-T redboot.ld%s -Ttext 0xA0020000 %(old_link)
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
# -*- python -*-
|
||||
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import gdb
|
||||
import os
|
||||
import os.path
|
||||
|
||||
pythondir = '/home/build/work/GCC-4-8-build/install-native/share/gcc-arm-none-eabi'
|
||||
libdir = '/home/build/work/GCC-4-8-build/install-native/arm-none-eabi/lib/armv7-ar/thumb/fpu'
|
||||
|
||||
# This file might be loaded when there is no current objfile. This
|
||||
# can happen if the user loads it manually. In this case we don't
|
||||
# update sys.path; instead we just hope the user managed to do that
|
||||
# beforehand.
|
||||
if gdb.current_objfile () is not None:
|
||||
# Update module path. We want to find the relative path from libdir
|
||||
# to pythondir, and then we want to apply that relative path to the
|
||||
# directory holding the objfile with which this file is associated.
|
||||
# This preserves relocatability of the gcc tree.
|
||||
|
||||
# Do a simple normalization that removes duplicate separators.
|
||||
pythondir = os.path.normpath (pythondir)
|
||||
libdir = os.path.normpath (libdir)
|
||||
|
||||
prefix = os.path.commonprefix ([libdir, pythondir])
|
||||
# In some bizarre configuration we might have found a match in the
|
||||
# middle of a directory name.
|
||||
if prefix[-1] != '/':
|
||||
prefix = os.path.dirname (prefix) + '/'
|
||||
|
||||
# Strip off the prefix.
|
||||
pythondir = pythondir[len (prefix):]
|
||||
libdir = libdir[len (prefix):]
|
||||
|
||||
# Compute the ".."s needed to get from libdir to the prefix.
|
||||
dotdots = ('..' + os.sep) * len (libdir.split (os.sep))
|
||||
|
||||
objfile = gdb.current_objfile ().filename
|
||||
dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir)
|
||||
|
||||
if not dir_ in sys.path:
|
||||
sys.path.insert(0, dir_)
|
||||
|
||||
# Load the pretty-printers.
|
||||
from libstdcxx.v6.printers import register_libstdcxx_printers
|
||||
register_libstdcxx_printers (gdb.current_objfile ())
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
%rename lib libc
|
||||
|
||||
*libgloss:
|
||||
-lgloss-linux
|
||||
|
||||
*lib:
|
||||
%(libc) %(libgloss)
|
||||
|
||||
*startfile:
|
||||
linux-crt0%O%s crti%O%s crtbegin%O%s
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
%rename link nano_link
|
||||
%rename link_gcc_c_sequence nano_link_gcc_c_sequence
|
||||
|
||||
*nano_libc:
|
||||
-lc_s
|
||||
|
||||
*nano_libgloss:
|
||||
%{specs=rdimon.specs:-lrdimon_s} %{specs=nosys.specs:-lnosys}
|
||||
|
||||
*link_gcc_c_sequence:
|
||||
%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
|
||||
|
||||
*link:
|
||||
%(nano_link) %:replace-outfile(-lc -lc_s) %:replace-outfile(-lg -lg_s) %:replace-outfile(-lrdimon -lrdimon_s) %:replace-outfile(-lstdc++ -lstdc++_s) %:replace-outfile(-lsupc++ -lsupc++_s)
|
||||
|
||||
*lib:
|
||||
%{!shared:%{g*:-lg_s} %{!p:%{!pg:-lc_s}}%{p:-lc_p}%{pg:-lc_p}}
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
%rename link_gcc_c_sequence nosys_link_gcc_c_sequence
|
||||
|
||||
*nosys_libgloss:
|
||||
-lnosys
|
||||
|
||||
*nosys_libc:
|
||||
%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_s}
|
||||
|
||||
*link_gcc_c_sequence:
|
||||
%(nosys_link_gcc_c_sequence) --start-group %G %(nosys_libc) %(nosys_libgloss) --end-group
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
%rename link old_link
|
||||
|
||||
*link:
|
||||
-T redboot.ld%s -Ttext 0x10000 %(old_link)
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
%rename link_gcc_c_sequence rdimon_link_gcc_c_sequence
|
||||
|
||||
*rdimon_libc:
|
||||
%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_s}
|
||||
|
||||
*rdimon_libgloss:
|
||||
%{!specs=nano.specs:-lrdimon} %{specs=nano.specs:-lrdimon_s}
|
||||
|
||||
*link_gcc_c_sequence:
|
||||
%(rdimon_link_gcc_c_sequence) --start-group %G %(rdimon_libc) %(rdimon_libgloss) --end-group
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
%rename link old_link
|
||||
|
||||
*link:
|
||||
%(old_link) -lrdpmon
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:rdpmon-crt0%O%s} %{pg:rdpmon-crt0%O%s}
|
||||
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
|
||||
"elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = 0x00020000;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.gnu.version : { *(.gnu.version) }
|
||||
.gnu.version_d : { *(.gnu.version_d) }
|
||||
.gnu.version_r : { *(.gnu.version_r) }
|
||||
.rel.init : { *(.rel.init) }
|
||||
.rela.init : { *(.rela.init) }
|
||||
.rel.text :
|
||||
{
|
||||
*(.rel.text)
|
||||
*(.rel.text.*)
|
||||
*(.rel.gnu.linkonce.t*)
|
||||
}
|
||||
.rela.text :
|
||||
{
|
||||
*(.rela.text)
|
||||
*(.rela.text.*)
|
||||
*(.rela.gnu.linkonce.t*)
|
||||
}
|
||||
.rel.fini : { *(.rel.fini) }
|
||||
.rela.fini : { *(.rela.fini) }
|
||||
.rel.rodata :
|
||||
{
|
||||
*(.rel.rodata)
|
||||
*(.rel.rodata.*)
|
||||
*(.rel.gnu.linkonce.r*)
|
||||
}
|
||||
.rela.rodata :
|
||||
{
|
||||
*(.rela.rodata)
|
||||
*(.rela.rodata.*)
|
||||
*(.rela.gnu.linkonce.r*)
|
||||
}
|
||||
.rel.data :
|
||||
{
|
||||
*(.rel.data)
|
||||
*(.rel.data.*)
|
||||
*(.rel.gnu.linkonce.d*)
|
||||
}
|
||||
.rela.data :
|
||||
{
|
||||
*(.rela.data)
|
||||
*(.rela.data.*)
|
||||
*(.rela.gnu.linkonce.d*)
|
||||
}
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.sdata :
|
||||
{
|
||||
*(.rel.sdata)
|
||||
*(.rel.sdata.*)
|
||||
*(.rel.gnu.linkonce.s*)
|
||||
}
|
||||
.rela.sdata :
|
||||
{
|
||||
*(.rela.sdata)
|
||||
*(.rela.sdata.*)
|
||||
*(.rela.gnu.linkonce.s*)
|
||||
}
|
||||
.rel.sbss : { *(.rel.sbss) }
|
||||
.rela.sbss : { *(.rela.sbss) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.stub)
|
||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||
*(.gnu.warning)
|
||||
*(.gnu.linkonce.t*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
} =0
|
||||
.init :
|
||||
{
|
||||
KEEP (*(.init))
|
||||
} =0
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(.fini))
|
||||
} =0
|
||||
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||
/* Adjust the address for the data segment. We want to adjust up to
|
||||
the same address within the page on the next page up. */
|
||||
. = ALIGN(256) + (. & (256 - 1));
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
*(.gnu.linkonce.d*)
|
||||
SORT(CONSTRUCTORS)
|
||||
}
|
||||
.data1 : { *(.data1) }
|
||||
.eh_frame : { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : { *(.gcc_except_table) }
|
||||
.ctors :
|
||||
{
|
||||
/* gcc uses crtbegin.o to find the start of
|
||||
the constructors, so we make sure it is
|
||||
first. Because this is a wildcard, it
|
||||
doesn't matter if the user does not
|
||||
actually link against crtbegin.o; the
|
||||
linker won't look for a file to match a
|
||||
wildcard. The wildcard also means that it
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
/* We don't want to include the .ctor section from
|
||||
from the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
}
|
||||
.dtors :
|
||||
{
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
}
|
||||
.jcr : { KEEP (*(.jcr)) }
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
.dynamic : { *(.dynamic) }
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.gnu.linkonce.s.*)
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
__bss_start = .;
|
||||
__bss_start__ = .;
|
||||
.sbss :
|
||||
{
|
||||
*(.dynsbss)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.scommon)
|
||||
}
|
||||
.bss :
|
||||
{
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(COMMON)
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
. = ALIGN(32 / 8);
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .;
|
||||
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
||||
PROVIDE (end = .);
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
.debug_ranges 0 : { *(.debug_ranges) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
.stack 0x80000 : { _stack = .; *(.stack) }
|
||||
/* These must appear regardless of . */
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
%rename link old_link
|
||||
|
||||
*link:
|
||||
-T redboot.ld%s -Ttext 0x20000 %(old_link)
|
||||
|
||||
*startfile:
|
||||
crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue