Mercurial > hg > index.cgi
comparison docs/manual.docbook.sgml @ 236:ce1fdc8d6568
Added ability to add padding after a section when linking.
Added the ability for lwlink to automatically append padding bytes to the
end of a section (once the section instances are merged). This behaviour is
controlled by the link script. See the updated documentation for more
information.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 11 Aug 2012 23:29:57 -0600 |
parents | d389adbcc4ab |
children | 0bc1c88fe776 |
comparison
equal
deleted
inserted
replaced
235:e3741cf53e00 | 236:ce1fdc8d6568 |
---|---|
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 | 1985 |
1986 <varlistentry> | 1986 <varlistentry> |
1987 <term>sectopt <parameter>section</parameter> padafter <parameter>byte,...</parameter></term> | |
1988 <listitem> | |
1989 | |
1990 <para> | |
1991 | |
1992 This will cause the linker to append the specified list of byte values | |
1993 (specified in hexadecimal separated by commas) to the end of the named | |
1994 section. This is done once all instances of the specified section are | |
1995 collected together. This has no effect if the specified section does not | |
1996 appear anywhere in any of the objects specified for linking. | |
1997 | |
1998 </para> | |
1999 | |
2000 <para> | |
2001 | |
2002 If code depends on the presence of this padding somewhere, it is sufficient | |
2003 to include an empty section of the specified name in the object that depends | |
2004 on it. | |
2005 | |
2006 </para> | |
2007 | |
2008 </listitem> | |
2009 | |
2010 <varlistentry> | |
1987 <term>define basesympat <parameter>string</parameter></term> | 2011 <term>define basesympat <parameter>string</parameter></term> |
1988 <listitem> | 2012 <listitem> |
1989 | 2013 |
1990 <para> | 2014 <para> |
1991 | 2015 |
1994 In the string, %s can appear exactly once and will be replaced with the | 2018 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 | 2019 section name. The base address is calculated after all instances of each |
1996 section have been collapsed together. | 2020 section have been collapsed together. |
1997 | 2021 |
1998 </para> | 2022 </para> |
2023 | |
2024 <para> | |
2025 | |
2026 It should be noted that if none of the objects to be linked contains a | |
2027 particular section name, there will be no base symbol defined for it, even | |
2028 if it is listed explicitly in the link script. If code depends on the | |
2029 presence of these symbols, it is sufficient to include an empty section of | |
2030 the specified name in the object that depends on it. | |
2031 | |
2032 </para> | |
2033 | |
2034 | |
1999 <para> If the pattern resolves to the same string for multiple | 2035 <para> If the pattern resolves to the same string for multiple |
2000 sections, the results are undefined. | 2036 sections, the results are undefined. |
2001 | 2037 |
2002 </para> | 2038 </para> |
2003 </listitem> | 2039 </listitem> |
2013 the string, %s can appear exactly once and will be replaced with the section | 2049 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 | 2050 name. The length is calculated after all instances of a section have been |
2015 collapsed together. | 2051 collapsed together. |
2016 | 2052 |
2017 </para> | 2053 </para> |
2054 | |
2055 <para> | |
2056 | |
2057 It should be noted that if none of the objects to be linked contains a | |
2058 particular section name, there will be no length symbol defined for it, even | |
2059 if it is listed explicitly in the link script. If code depends on the | |
2060 presence of these symbols, it is sufficient to include an empty section of | |
2061 the specified name in the object that depends on it. | |
2062 | |
2063 </para> | |
2064 | |
2065 | |
2018 <para> | 2066 <para> |
2019 If the pattern resolves to the same string for multiple | 2067 If the pattern resolves to the same string for multiple |
2020 sections, the results are undefined. | 2068 sections, the results are undefined. |
2021 | 2069 |
2022 </para> | 2070 </para> |