[llvm-dev] Trying to use a linker script with LLVM 3.8.1

Stephan Mühlstrasser via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 10 13:27:50 PDT 2016


Hi,

I'm trying to use a linker script to link a bare-metal ARM binary. I'm 
using the precompiled LLVM 3.8.1 binaries for Windows 64-bit from llvm.org.

This is the linker script:

SECTIONS
{
	. = 0x8000;
	
	.text : {
		*(.text*)
	}

	_etext = .;

	.rodata : {
		*(.rodata*)
	}

	__init_start = .;

	.init_array : {
		*(.init_array*)
	}

	__init_end = .;

	.data : {
		*(.data*)
	}

	__bss_start = .;

	.bss : {
		*(.bss*)
	}

	_end = .;
}

Using this script results in the linker error message ": expected, but 
got =".

I found this llvm-dev thread where similar features are used and where 
the linker script seems to work as expected:

http://lists.llvm.org/pipermail/llvm-dev/2015-July/087379.html

What's wrong with the above linker script? Is there any documentation 
available which features are currently supported in linker scripts?

Thank you
Stephan


More information about the llvm-dev mailing list