This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils]link error on section



Hi,
? ? ? ? Here is the lds, I split the text section in ROM and RAM. While in ROM text can be jumpped
into. While the text in ROM can't jump to RAM. The cause is, when linking over, the jump addr to RAM
is error. How can I solve this problem?

ENTRY(_start)
OUTPUT_FORMAT("elf32-bigmips")
SEARCH_DIR(.)
__DYNAMIC ?= ?0;

SECTIONS
{
? .flash 0xdfc00000 : {
? ? dt.o(.text)
? ? }

? . = 0x00010000;
? .text : {
? ? ?_ftext = . ;
? ? *(.init)
? ? ?eprol ?= ?.;
? ? *(.text)
? ? *(.text.*)
? ? *(.gnu.linkonce.t*)
? ? *(.mips16.fn.*)
? ? *(.mips16.call.*)
? ? PROVIDE (__runtime_reloc_start = .);
? ? *(.rel.sdata)
? ? PROVIDE (__runtime_reloc_stop = .);
? ? *(.fini)
? ? ?etext ?= ?.;
? ? ?_etext ?= ?.;
? }

? . = ALIGN(16);
? .rodata : {
? ? *(.rdata)
? ? *(.rodata)
? ? *(.rodata.*)
? ? *(.gnu.linkonce.r*)
? }

? ?_fdata = ALIGN(16);
? .data : {
? ? *(.data)
? ? *(.data.*)
? ? *(.gnu.linkonce.d*)
? }
? . = ALIGN(8);
? _gp = . + 0x8000;
? __global = _gp;
? .sdata : {
? ? *(.sdata)
? ? *(.sdata.*)
? ? *(.gnu.linkonce.s*)
? }
? . = ALIGN(4);
? ?edata ?= ?.;
? ?_edata ?= ?.;

? ?_fbss = .;
? .sbss : {
? ? *(.sbss)
? ? *(.scommon)
? }
? .bss : {
? ? _bss_start = . ;
? ? *(.bss)
? ? *(COMMON)
? }

? ?end = .;
? ?_end = .;

? /* 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) }

}

when the func in dt.o jump to the ram func, the addr is 0xd......., the correct is 0x0......

Thanks first.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]