comparison docs/manual.docbook.sgml @ 234:d389adbcc4ab

Added section base and length symbols to lwlink Added the ability for a link script to define section base and section length symbols when linking. These symbols are searched for when an external reference is resolved before looking up any symbols in the various objects being linked. Also documented the new link script directives and added such directives to all default link scripts.
author William Astle <lost@l-w.ca>
date Fri, 10 Aug 2012 23:47:56 -0600
parents 7da0452512b2
children ce1fdc8d6568
comparison
equal deleted inserted replaced
233:7887a48b74df 234:d389adbcc4ab
1980 bss will be matched. 1980 bss will be matched.
1981 </para> 1981 </para>
1982 1982
1983 <para>The following directives are understood in a linker script.</para> 1983 <para>The following directives are understood in a linker script.</para>
1984 <variablelist> 1984 <variablelist>
1985
1986 <varlistentry>
1987 <term>define basesympat <parameter>string</parameter></term>
1988 <listitem>
1989
1990 <para>
1991
1992 This causes the linker to define a symbol for the ultimate base address of
1993 each section using the pattern specified by <parameter>string</parameter>.
1994 In the string, %s can appear exactly once and will be replaced with the
1995 section name. The base address is calculated after all instances of each
1996 section have been collapsed together.
1997
1998 </para>
1999 <para> If the pattern resolves to the same string for multiple
2000 sections, the results are undefined.
2001
2002 </para>
2003 </listitem>
2004
2005 <varlistentry>
2006 <term>define lensympat <parameter>string</parameter></term>
2007 <listitem>
2008
2009 <para>
2010
2011 This causes the linker to define a symbol for the ultimate length of each
2012 section using the pattern specified by <parameter>string</parameter>. In
2013 the string, %s can appear exactly once and will be replaced with the section
2014 name. The length is calculated after all instances of a section have been
2015 collapsed together.
2016
2017 </para>
2018 <para>
2019 If the pattern resolves to the same string for multiple
2020 sections, the results are undefined.
2021
2022 </para>
2023 </listitem>
2024
1985 <varlistentry> 2025 <varlistentry>
1986 <term>section <parameter>name</parameter> load <parameter>addr</parameter></term> 2026 <term>section <parameter>name</parameter> load <parameter>addr</parameter></term>
1987 <listitem><para> 2027 <listitem><para>
1988 2028
1989 This causes the section <parameter>name</parameter> to load at 2029 This causes the section <parameter>name</parameter> to load at