1 From 56d606931716de30a89a40dc69a9282c1b4e2880 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Thu, 18 Aug 2016 18:04:06 +0200
4 Subject: [PATCH] libgcc/config/bfin: use the generic linker version
7 This commit makes the Blackfin platform use the generic linker version
8 information, rather than a completely duplicated file, specific for the
11 This is made possible using the newly introduced skip_underscore
12 variable of the mkmap-symver script.
14 This also allows to get a correct linker version file, with symbol names
15 matching the ones found in libgcc. Thanks to this, the necessary symbols
16 are marked "GLOBAL" instead of "LOCAL", which makes them visible at link
17 time, and solves a large number of "undefined reference"
18 issues. Indeed, the Blackfin specific linker version script had an extra
19 underscore in front of all symbols, which meant none of them matched the
20 symbols in libgcc, and therefore all libgcc symbols were marked as
21 "LOCAL", making them invisible for linking.
23 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
25 libgcc/config/bfin/libgcc-glibc.ver | 1894 +----------------------------------
26 libgcc/config/bfin/t-linux | 3 +-
27 2 files changed, 4 insertions(+), 1893 deletions(-)
29 diff --git a/libgcc/config/bfin/libgcc-glibc.ver b/libgcc/config/bfin/libgcc-glibc.ver
30 index b1bd2df..2af3df7 100644
31 --- a/libgcc/config/bfin/libgcc-glibc.ver
32 +++ b/libgcc/config/bfin/libgcc-glibc.ver
34 # along with GCC; see the file COPYING3. If not see
35 # <http://www.gnu.org/licenses/>.
38 - # libgcc1 integer symbols
53 - # libgcc1 floating point symbols
117 - # libgcc2 DImode arithmetic (for 32-bit targets).
153 - # libgcc2 TImode arithmetic (for 64-bit targets).
180 - # Used to deal with trampoline initialization on some platforms
184 - __Unwind_DeleteException
186 - __Unwind_ForcedUnwind
189 - __Unwind_GetLanguageSpecificData
190 - __Unwind_GetRegionStart
191 - __Unwind_GetTextRelBase
192 - __Unwind_GetDataRelBase
193 - __Unwind_RaiseException
197 - ___deregister_frame
198 - ___deregister_frame_info
199 - ___deregister_frame_info_bases
201 - ___register_frame_info
202 - ___register_frame_info_bases
203 - ___register_frame_info_table
204 - ___register_frame_info_table_bases
205 - ___register_frame_table
208 - __Unwind_SjLj_Register
209 - __Unwind_SjLj_Unregister
210 - __Unwind_SjLj_RaiseException
211 - __Unwind_SjLj_ForcedUnwind
212 - __Unwind_SjLj_Resume
215 -%inherit GCC_3.3 GCC_3.0
217 - __Unwind_FindEnclosingFunction
220 - __Unwind_Resume_or_Rethrow
221 - __Unwind_SjLj_Resume_or_Rethrow
224 -%inherit GCC_3.3.1 GCC_3.3
226 - ___gcc_personality_sj0
227 - ___gcc_personality_v0
230 -%inherit GCC_3.3.2 GCC_3.3.1
233 -%inherit GCC_3.3.4 GCC_3.3.2
239 -%inherit GCC_3.4 GCC_3.3.4
241 - # bit scanning and counting built-ins
256 -%inherit GCC_3.4.2 GCC_3.4
258 - # Used to deal with trampoline initialization on some platforms
259 - ___enable_execute_stack
260 - ___trampoline_setup
263 -%inherit GCC_3.4.4 GCC_3.4.2
265 - # libgcc2 TImode arithmetic (for 64-bit targets).
273 -%inherit GCC_4.0.0 GCC_3.4.4
275 - # libgcc2 __builtin_powi helpers.
281 - # c99 compliant complex arithmetic
292 %inherit GCC_4.1.0 GCC_4.0.0
294 - ___smulsi3_highpart
295 - ___umulsi3_highpart
298 -%inherit GCC_4.2.0 GCC_4.1.0
300 - # unsigned-to-floating conversions
316 -%inherit GCC_4.3.0 GCC_4.2.0
318 - # byte swapping routines
321 - ___emutls_get_address
322 - ___emutls_register_common
327 - # fixed-point routines
1300 - ___satfractuqquhq2
1301 - ___satfractuqqusq2
1302 - ___satfractuqqudq2
1303 - ___satfractuqqutq2
1317 - ___satfractuhquqq2
1318 - ___satfractuhqusq2
1319 - ___satfractuhqudq2
1320 - ___satfractuhqutq2
1334 - ___satfractusquqq2
1335 - ___satfractusquhq2
1336 - ___satfractusqudq2
1337 - ___satfractusqutq2
1351 - ___satfractudquqq2
1352 - ___satfractudquhq2
1353 - ___satfractudqusq2
1354 - ___satfractudqutq2
1368 - ___satfractutquqq2
1369 - ___satfractutquhq2
1370 - ___satfractutqusq2
1371 - ___satfractutqudq2
1390 - ___satfractuhausa2
1391 - ___satfractuhauda2
1392 - ___satfractuhauta2
1407 - ___satfractusauha2
1408 - ___satfractusauda2
1409 - ___satfractusauta2
1424 - ___satfractudauha2
1425 - ___satfractudausa2
1426 - ___satfractudauta2
1441 - ___satfractutauha2
1442 - ___satfractutausa2
1443 - ___satfractutauda2
1750 - ___satfractunsqiqq
1751 - ___satfractunsqihq
1752 - ___satfractunsqisq
1753 - ___satfractunsqidq
1754 - ___satfractunsqitq
1755 - ___satfractunsqiha
1756 - ___satfractunsqisa
1757 - ___satfractunsqida
1758 - ___satfractunsqita
1759 - ___satfractunsqiuqq
1760 - ___satfractunsqiuhq
1761 - ___satfractunsqiusq
1762 - ___satfractunsqiudq
1763 - ___satfractunsqiutq
1764 - ___satfractunsqiuha
1765 - ___satfractunsqiusa
1766 - ___satfractunsqiuda
1767 - ___satfractunsqiuta
1768 - ___satfractunshiqq
1769 - ___satfractunshihq
1770 - ___satfractunshisq
1771 - ___satfractunshidq
1772 - ___satfractunshitq
1773 - ___satfractunshiha
1774 - ___satfractunshisa
1775 - ___satfractunshida
1776 - ___satfractunshita
1777 - ___satfractunshiuqq
1778 - ___satfractunshiuhq
1779 - ___satfractunshiusq
1780 - ___satfractunshiudq
1781 - ___satfractunshiutq
1782 - ___satfractunshiuha
1783 - ___satfractunshiusa
1784 - ___satfractunshiuda
1785 - ___satfractunshiuta
1786 - ___satfractunssiqq
1787 - ___satfractunssihq
1788 - ___satfractunssisq
1789 - ___satfractunssidq
1790 - ___satfractunssitq
1791 - ___satfractunssiha
1792 - ___satfractunssisa
1793 - ___satfractunssida
1794 - ___satfractunssita
1795 - ___satfractunssiuqq
1796 - ___satfractunssiuhq
1797 - ___satfractunssiusq
1798 - ___satfractunssiudq
1799 - ___satfractunssiutq
1800 - ___satfractunssiuha
1801 - ___satfractunssiusa
1802 - ___satfractunssiuda
1803 - ___satfractunssiuta
1804 - ___satfractunsdiqq
1805 - ___satfractunsdihq
1806 - ___satfractunsdisq
1807 - ___satfractunsdidq
1808 - ___satfractunsditq
1809 - ___satfractunsdiha
1810 - ___satfractunsdisa
1811 - ___satfractunsdida
1812 - ___satfractunsdita
1813 - ___satfractunsdiuqq
1814 - ___satfractunsdiuhq
1815 - ___satfractunsdiusq
1816 - ___satfractunsdiudq
1817 - ___satfractunsdiutq
1818 - ___satfractunsdiuha
1819 - ___satfractunsdiusa
1820 - ___satfractunsdiuda
1821 - ___satfractunsdiuta
1822 - ___satfractunstiqq
1823 - ___satfractunstihq
1824 - ___satfractunstisq
1825 - ___satfractunstidq
1826 - ___satfractunstitq
1827 - ___satfractunstiha
1828 - ___satfractunstisa
1829 - ___satfractunstida
1830 - ___satfractunstita
1831 - ___satfractunstiuqq
1832 - ___satfractunstiuhq
1833 - ___satfractunstiusq
1834 - ___satfractunstiudq
1835 - ___satfractunstiutq
1836 - ___satfractunstiuha
1837 - ___satfractunstiusa
1838 - ___satfractunstiuda
1839 - ___satfractunstiuta
1842 -%inherit GCC_4.4.0 GCC_4.3.0
1844 - ___sync_fetch_and_add_1
1845 - ___sync_fetch_and_sub_1
1846 - ___sync_fetch_and_or_1
1847 - ___sync_fetch_and_and_1
1848 - ___sync_fetch_and_xor_1
1849 - ___sync_fetch_and_nand_1
1850 - ___sync_add_and_fetch_1
1851 - ___sync_sub_and_fetch_1
1852 - ___sync_or_and_fetch_1
1853 - ___sync_and_and_fetch_1
1854 - ___sync_xor_and_fetch_1
1855 - ___sync_nand_and_fetch_1
1856 - ___sync_bool_compare_and_swap_1
1857 - ___sync_val_compare_and_swap_1
1858 - ___sync_lock_test_and_set_1
1860 - ___sync_fetch_and_add_2
1861 - ___sync_fetch_and_sub_2
1862 - ___sync_fetch_and_or_2
1863 - ___sync_fetch_and_and_2
1864 - ___sync_fetch_and_xor_2
1865 - ___sync_fetch_and_nand_2
1866 - ___sync_add_and_fetch_2
1867 - ___sync_sub_and_fetch_2
1868 - ___sync_or_and_fetch_2
1869 - ___sync_and_and_fetch_2
1870 - ___sync_xor_and_fetch_2
1871 - ___sync_nand_and_fetch_2
1872 - ___sync_bool_compare_and_swap_2
1873 - ___sync_val_compare_and_swap_2
1874 - ___sync_lock_test_and_set_2
1876 - ___sync_fetch_and_add_4
1877 - ___sync_fetch_and_sub_4
1878 - ___sync_fetch_and_or_4
1879 - ___sync_fetch_and_and_4
1880 - ___sync_fetch_and_xor_4
1881 - ___sync_fetch_and_nand_4
1882 - ___sync_add_and_fetch_4
1883 - ___sync_sub_and_fetch_4
1884 - ___sync_or_and_fetch_4
1885 - ___sync_and_and_fetch_4
1886 - ___sync_xor_and_fetch_4
1887 - ___sync_nand_and_fetch_4
1888 - ___sync_bool_compare_and_swap_4
1889 - ___sync_val_compare_and_swap_4
1890 - ___sync_lock_test_and_set_4
1892 - ___sync_fetch_and_add_8
1893 - ___sync_fetch_and_sub_8
1894 - ___sync_fetch_and_or_8
1895 - ___sync_fetch_and_and_8
1896 - ___sync_fetch_and_xor_8
1897 - ___sync_fetch_and_nand_8
1898 - ___sync_add_and_fetch_8
1899 - ___sync_sub_and_fetch_8
1900 - ___sync_or_and_fetch_8
1901 - ___sync_and_and_fetch_8
1902 - ___sync_xor_and_fetch_8
1903 - ___sync_nand_and_fetch_8
1904 - ___sync_bool_compare_and_swap_8
1905 - ___sync_val_compare_and_swap_8
1906 - ___sync_lock_test_and_set_8
1908 - ___sync_fetch_and_add_16
1909 - ___sync_fetch_and_sub_16
1910 - ___sync_fetch_and_or_16
1911 - ___sync_fetch_and_and_16
1912 - ___sync_fetch_and_xor_16
1913 - ___sync_fetch_and_nand_16
1914 - ___sync_add_and_fetch_16
1915 - ___sync_sub_and_fetch_16
1916 - ___sync_or_and_fetch_16
1917 - ___sync_and_and_fetch_16
1918 - ___sync_xor_and_fetch_16
1919 - ___sync_nand_and_fetch_16
1920 - ___sync_bool_compare_and_swap_16
1921 - ___sync_val_compare_and_swap_16
1922 - ___sync_lock_test_and_set_16
1924 - ___sync_synchronize
1927 -%inherit GCC_4.5.0 GCC_4.4.0
1931 + __smulsi3_highpart
1932 + __umulsi3_highpart
1934 diff --git a/libgcc/config/bfin/t-linux b/libgcc/config/bfin/t-linux
1935 index 1c42e48..8898157 100644
1936 --- a/libgcc/config/bfin/t-linux
1937 +++ b/libgcc/config/bfin/t-linux
1939 -SHLIB_MAPFILES = $(srcdir)/config/bfin/libgcc-glibc.ver
1940 +SHLIB_MAPFILES += $(srcdir)/config/bfin/libgcc-glibc.ver
1941 +SHLIB_MKMAP_OPTS = -v skip_underscore=1