aboutsummaryrefslogtreecommitdiff
path: root/blockdev-nbd.c
blob: 1ef11041a730fdad94f5bc2369efc2d0d8960708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/*
 * Serving QEMU block devices via NBD
 *
 * Copyright (c) 2012 Red Hat, Inc.
 *
 * Author: Paolo Bonzini <pbonzini@redhat.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or
 * later.  See the COPYING file in the top-level directory.
 */

#include "qemu/osdep.h"
#include "sysemu/blockdev.h"
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-block.h"
#include "sysemu/sysemu.h"
#include "block/nbd.h"
#include "io/channel-socket.h"
#include "io/net-listener.h"

typedef struct NBDServerData {
    QIONetListener *listener;
    QCryptoTLSCreds *tlscreds;
} NBDServerData;

static NBDServerData *nbd_server;

static void nbd_blockdev_client_closed(NBDClient *client, bool ignored)
{
    nbd_client_put(client);
}

static void nbd_accept(QIONetListener *listener, QIOChannelSocket *cioc,
                       gpointer opaque)
{
    qio_channel_set_name(QIO_CHANNEL(cioc), "nbd-server");
    nbd_client_new(NULL, cioc,
                   nbd_server->tlscreds, NULL,
                   nbd_blockdev_client_closed);
}


static void nbd_server_free(NBDServerData *server)
{
    if (!server) {
        return;
    }

    qio_net_listener_disconnect(server->listener);
    object_unref(OBJECT(server->listener));
    if (server->tlscreds) {
        object_unref(OBJECT(server->tlscreds));
    }

    g_free(server);
}

static QCryptoTLSCreds *nbd_get_tls_creds(const char *id, Error **errp)
{
    Object *obj;
    QCryptoTLSCreds *creds;

    obj = object_resolve_path_component(
        object_get_objects_root(), id);
    if (!obj) {
        error_setg(errp, "No TLS credentials with id '%s'",
                   id);
        return NULL;
    }
    creds = (QCryptoTLSCreds *)
        object_dynamic_cast(obj, TYPE_QCRYPTO_TLS_CREDS);
    if (!creds) {
        error_setg(errp, "Object with id '%s' is not TLS credentials",
                   id);
        return NULL;
    }

    if (creds->endpoint != QCRYPTO_TLS_CREDS_ENDPOINT_SERVER) {
        error_setg(errp,
                   "Expecting TLS credentials with a server endpoint");
        return NULL;
    }
    object_ref(obj);
    return creds;
}


void nbd_server_start(SocketAddress *addr, const char *tls_creds,
                      Error **errp)
{
    if (nbd_server) {
        error_setg(errp, "NBD server already running");
        return;
    }

    nbd_server = g_new0(NBDServerData, 1);
    nbd_server->listener = qio_net_listener_new();

    qio_net_listener_set_name(nbd_server->listener,
                              "nbd-listener");

    if (qio_net_listener_open_sync(nbd_server->listener, addr, errp) < 0) {
        goto error;
    }

    if (tls_creds) {
        nbd_server->tlscreds = nbd_get_tls_creds(tls_creds, errp);
        if (!nbd_server->tlscreds) {
            goto error;
        }

        /* TODO SOCKET_ADDRESS_TYPE_FD where fd has AF_INET or AF_INET6 */
        if (addr->type != SOCKET_ADDRESS_TYPE_INET) {
            error_setg(errp, "TLS is only supported with IPv4/IPv6");
            goto error;
        }
    }

    qio_net_listener_set_client_func(nbd_server->listener,
                                     nbd_accept,
                                     NULL,
                                     NULL);

    return;

 error:
    nbd_server_free(nbd_server);
    nbd_server = NULL;
}

void qmp_nbd_server_start(SocketAddressLegacy *addr,
                          bool has_tls_creds, const char *tls_creds,
                          Error **errp)
{
    SocketAddress *addr_flat = socket_address_flatten(addr);

    nbd_server_start(addr_flat, tls_creds, errp);
    qapi_free_SocketAddress(addr_flat);
}

void qmp_nbd_server_add(const char *device, bool has_name, const char *name,
                        bool has_writable, bool writable, Error **errp)
{
    BlockDriverState *bs = NULL;
    BlockBackend *on_eject_blk;
    NBDExport *exp;

    if (!nbd_server) {
        error_setg(errp, "NBD server not running");
        return;
    }

    if (!has_name) {
        name = device;
    }

    if (nbd_export_find(name)) {
        error_setg(errp, "NBD server already has export named '%s'", name);
        return;
    }

    on_eject_blk = blk_by_name(device);

    bs = bdrv_lookup_bs(device, device, errp);
    if (!bs) {
        return;
    }

    if (!has_writable) {
        writable = false;
    }
    if (bdrv_is_read_only(bs)) {
        writable = false;
    }

    exp = nbd_export_new(bs, 0, -1, writable ? 0 : NBD_FLAG_READ_ONLY,
                         NULL, false, on_eject_blk, errp);
    if (!exp) {
        return;
    }

    nbd_export_set_name(exp, name);

    /* The list of named exports has a strong reference to this export now and
     * our only way of accessing it is through nbd_export_find(), so we can drop
     * the strong reference that is @exp. */
    nbd_export_put(exp);
}

void qmp_nbd_server_remove(const char *name,
                           bool has_mode, NbdServerRemoveMode mode,
                           Error **errp)
{
    NBDExport *exp;

    if (!nbd_server) {
        error_setg(errp, "NBD server not running");
        return;
    }

    exp = nbd_export_find(name);
    if (exp == NULL) {
        error_setg(errp, "Export '%s' is not found", name);
        return;
    }

    if (!has_mode) {
        mode = NBD_SERVER_REMOVE_MODE_SAFE;
    }

    nbd_export_remove(exp, mode, errp);
}

void qmp_nbd_server_stop(Error **errp)
{
    nbd_export_close_all();

    nbd_server_free(nbd_server);
    nbd_server = NULL;
}

void qmp_x_nbd_server_add_bitmap(const char *name, const char *bitmap,
                                 bool has_bitmap_export_name,
                                 const char *bitmap_export_name,
                                 Error **errp)
{
    NBDExport *exp;

    if (!nbd_server) {
        error_setg(errp, "NBD server not running");
        return;
    }

    exp = nbd_export_find(name);
    if (exp == NULL) {
        error_setg(errp, "Export '%s' is not found", name);
        return;
    }

    nbd_export_bitmap(exp, bitmap,
                      has_bitmap_export_name ? bitmap_export_name : bitmap,
                      errp);
}
d='n64' href='#n64'>64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137
2002-05-10  Tom Rix  <trix@redhat.com>

	* emultempl/aix.em: (gld*_set_output_arch): New function. Use 
	architecture and machine information in the output bfd.
	(gld*_before_parse): Remove old arch and machine code.
	(choose_target): Rename to gld*_choose_target.
	(rtld): Change type to int. 
	* ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for 
	objects in XCOFF archives.
	* ldfile.h: Update copyright date.

2002-05-10  Jakub Jelinek  <jakub@redhat.com>

	* ldmain.c (main): Enable -z combreloc by default.

2002-05-07  Federico G. Schwindt <fgsch@olimpo.com.br>

	* Makefile.am: Honour DESTDIR.
	* Makefile.in: Regenerate.

2002-05-07  Richard Sandiford  <rsandifo@redhat.com>

	* ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
	(lang_enter_overlay): Remove the last two parameters.
	(lang_leave_overlay): Take them here instead.
	* ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
	(section): Pass LMA and crossref flag to lang_leave_overlay rather
	than lang_enter_overlay.
	* ldlang.c (lang_memory_region_lookup): Return null for null names.
	(lang_output_section_statement_lookup): Initialize update_dot_tree.
	(lang_size_sections_1): Evaluate it.
	(lang_leave_output_section_statement): Rework LMA lookup.
	(overlay_lma, overlay_nocrossrefs): Remove.
	(lang_enter_overlay): Remove LMA and corssref arguments.
	(lang_enter_overlay_section): Don't set the LMA here.
	(lang_leave_overlay): Take LMA and crossref arguments.  Move the '.'
	assignment to the last section's update_dot_tree.  Unconditionally
	use the load and run-time regions specified in the OVERLAY statement.
	Likewise the first section's LMA.  Only set the other sections' LMAs
	when no load region is given.

2002-05-06  Nick Clifton <nickc@redhat.com>

	* po/sv.po: New translation.

2002-05-04  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/hppaelf.em (build_section_lists): New function.
	(gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
	and build_section_lists.

2002-05-03  Kazu Hirata  <kazu@cs.umass.edu>

	* ld.h: Fix formatting.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
	* ldmain.c: Likewise.
	* lexsup.c: Likewise.
	* pe-dll.c: Likewise.

2002-05-02  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
	Adjust for ppc64_elf_set_toc change.  #include libbfd.h.
	(build_section_lists): Do output_section tests here.

2002-04-30  Tom Rix  <trix@redhat.com>

	* emultempl/aix.em : (gld*_parse_arge): Formatting changes.

2002-05-01  Alan Modra  <amodra@bigpond.net.au>

	Long branch stubs, multiple stub sections.
	* emultempl/ppc64elf.em: Include ldctor.h.
	(stub_file): New var.
	(group_size): New var.
	(ppc_create_output_section_statements): New function.
	(struct hook_stub_info): New.
	(hook_in_stub): New function.
	(ppc_add_stub_section): New function.
	(ppc_layout_sections_again): New function.
	(build_section_lists): New function.
	(gld${EMULATION_NAME}_finish): Rewrite.
	(real_func): New var.
	(ppc_for_each_input_file_wrapper): New function.
	(ppc_lang_for_each_input_file): New function.
	(lang_for_each_input_file): Define.
	(PARSE_AND_LIST_PROLOGUE): Define.
	(PARSE_AND_LIST_LONGOPTS): Define.
	(PARSE_AND_LIST_OPTIONS): Define.
	(PARSE_AND_LIST_ARGS_CASES): Define.
	(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.

2002-04-30  Tom Rix  <trix@redhat.com>

	* emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add 
	-blibpath, -bnolibpath support. 
 
2002-04-30  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
	(eelf32ppcwindiss.c): New target.
	* Makefile.in: Regenerated.
	* configure.tgt: Add support for powerpc-*-windiss.
	* emulparams/elf32ppcwindiss.sh: New file.
	
2002-04-30  Richard Sandiford  <rsandifo@redhat.com>

	* ldlang.c (print_assignment): Update print_dot for assignments to ".".
	* ldexp.c (exp_print_token): Add "infix_p" argument.
	(exp_print_tree): Update accordingly.

2002-04-28  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
	* Makefile.in: Regenerate.
	* mpw-elfmips.c: Delete.
	* mpw-eppcmac.c: Delete.
	* mpw-esh.c: Delete.
	* mpw-idtmips.c: Delete.

Wed Apr 17 19:23:14 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* emulparams/shelf32.sh (MACHINE): Now sh5.

2002-04-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	* ldgram.y: Fix syntax warning.

2002-04-11  Nick Clifton  <nickc@cambridge.redhat.com>

	* emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
	to prevent "-n" from being taken as an abbreviation for
	"--no-pipeline-knowledge".

2002-04-08  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (lang_size_sections_1): Don't complain about
	SEC_NEVER_LOAD sections having no memory region specified.

	* ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.

2002-04-07  matthew green  <mrg@redhat.com>

	* ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.

2002-04-04  Alan Modra  <amodra@bigpond.net.au>

	* dep-in.sed: Cope with absolute paths.
	* Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
	Run "make dep-am".
	* Makefile.in: Regenerate.

2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	* emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.

2002-04-03  Jakub Jelinek  <jakub@redhat.com>

	* ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
	is smaller than maximum, round dot up to common page boundary.

2002-03-28  Alan Modra  <amodra@bigpond.net.au>

	* configure.host: Set up for generic hosts first, then tweak as
	necessary in more specific targets.
	(HOSTING_LIBS): Include libgcc_eh.a if found.

2002-03-23  Andreas Jaeger  <aj@suse.de>

	* emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.

2002-03-21  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

2002-03-21  Albert Chin-A-Young  <china@thewrittenword.com>

	* genscripts.sh (LIB_SEARCH_DIRS): Quote path.

2002-03-20  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (ldlang_add_undef): If the output bfd has been opened,
	add the symbol to the linker hash table immediately.
	(lang_place_undefineds): Split symbol creation out..
	(insert_undefined): ..to here.

2002-03-18  David O'Brien  <obrien@FreeBSD.org>

	* emultempl/elf32.em: Use lbasename vs. basename to fix problem where
	the contents of the buffer returned from basename function will are
	getting overwritten while still being used.

Mon Mar 18 17:38:39 CET 2002  Jan Hubicka  <jh@suse.cz>
			      Andreas Jaeger  <aj@suse.de>
			      Andreas Schwab  <schwab@suse.de>

	* configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
	* elf_x86_64.sh (ARCH): Set to i386:x86-64
	set libraries to default to lib64 paths.

2002-03-18  Tom Rix  <trix@redhat.com>

	* Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
	* configure.tgt : Same.
	* emulparms/aix5ppc.sh : New file. For eaix5ppc.
	* emulparms/aix5rs6.sh : New file. For eaix5rs6.
	* emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
	emulation parameters for better -b32, -b64 support.
	* emulparms/aixrs6.sh : Same.
	* emulparms/ppcmacos.sh : Same.
	* emultempl/aix.em (choose_target) : Use new emulation parameters
	OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
	* Makefile.in : Regenerate.

2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/fr.po: Updated version.

2002-03-18  Alan Modra  <amodra@bigpond.net.au>

	* ldmain.c (main): Move .text readonly flag fudges from here..
	* ldlang.c (lang_process): ..to here.

2002-03-14  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (lang_check): Remove the word size check added in last
	change.  Treat emitrelocations case as for relocatable links.

2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/fr.po: Updated version.

2002-03-13  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (lang_check): Do relocatable link checks first, so that
	warn_mismatch can't override.  Check compatible and word size too.

2002-03-07  Daniel Jacobowitz  <drow@mvista.com>

	* ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.

2002-03-05  Jakub Jelinek  <jakub@redhat.com>

	* scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
	DATA_SEGMENT_ALIGN.

2002-03-04  H.J. Lu <hjl@gnu.org>

	* scripttempl/elf.sc: Put .preinit_array, .init_array and
	.fini_array in the data segment.

2002-03-04  Alan Modra  <amodra@bigpond.net.au>

	* scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.

2002-03-01  David Mosberger  <davidm@hpl.hp.com>

	* scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
	.init_array, and .fini_array.

2002-02-20  Andreas Schwab  <schwab@suse.de>

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
	.IA64_unwind* in a relocatable link.

2002-02-20  Nick Clifton  <nickc@cambridge.redhat.com>

	* NEWS: Mark 2.12 branch.

2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
	* emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".

2002-02-18  Tom Rix  <trix@redhat.com>

	* emultempl/aix.em (gld*_parse_args): Add -brtl support.
	(gld*_before_allocation): Same.
	(gld*_create_output_section_statements): Generate
	__rtinit if run time linking.  Add librtl.a to the link.
	(gld*_read_file): Clean.

2002-02-18  Alan Modra  <amodra@bigpond.net.au>

	* emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.

2002-02-18  David O'Brien  <obrien@FreeBSD.org>

	* Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
	eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
	and eelf64alpha_fbsd.
	* Makefile.in: Regenerate.
	* configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
	x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
	use a FreeBSD-specific emulation rather than the psABI one.
	* emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
	for all FreeBSD ELF systems.
	* emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
	emulation.
	* emulparams/elf32ppc_fbsd.sh: Likewise.
	* emulparams/elf64_ia64_fbsd.sh: Likewise.
	* emulparams/elf64_sparc_fbsd.sh: Likewise.
	* emulparams/elf64alpha_fbsd.sh: Likewise.
	* emulparams/elf_i386_fbsd.sh: Likewise.
	* emulparams/elf_x86_64_fbsd.sh: Likewise.

2002-02-18  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/tr.po: Updated version.

2002-02-18  Alan Modra  <amodra@bigpond.net.au>

	* ld.texinfo (Output Section Fill): Fix amateur texinfo.
	(FILL): Likewise.

2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>

	* emultempl/mmo.em (mmo_after_open): Don't call
	_bfd_mmix_check_all_relocs when producing ELF output.

2002-02-15  Richard Henderson  <rth@redhat.com>

	* emulparams/elf64alpha.sh (NOP): Adjust for big-endian
	definition.  Emit a unop+nop pair.

2002-02-15  Hans-Peter Nilsson  <hp@bitrange.com>

	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
	for presence of .MMIX.reg_contents.linker_allocated before early
	exit.

	* NEWS: Mention support for MMIX.

2002-02-15  Alan Modra  <amodra@bigpond.net.au>

	Support arbitrary length fill patterns.
	* ld.texinfo (Output Section Fill): Describe fill expressions.
	(FILL): Refer to the above.
	* ldexp.h (etree_value_type): Add "str" field.
	(union etree_union): Add "str" to "value" struct.
	(exp_bigintop): Declare.
	(exp_get_fill): Declare.
	* ldexp.c: Include "safe-ctype.h".
	(exp_intop): Set value.str to NULL.
	(exp_bigintop): New function.
	(new_rel): Pass in "str", and set new.str from it.
	(new_rel_from_section): Set new.str to NULL.
	(fold_name): Adjust calls to new_rel.
	(exp_fold_tree): Likewise.
	(exp_get_fill): New function.
	* ldgram.y (struct big_int bigint, fill_type *fill): New.
	(INT): Returns a "bigint".  Adjust all code handling INTs.
	(fill_opt): Returns a "fill".
	(fill_exp): Split out of fill_opt, use for FILL.
	* ldlang.h (struct _fill_type): New.
	(fill_type): Move typedef to ldexp.h.
	(lang_output_section_statement_type): "fill" is now a pointer.
	(lang_fill_statement_type): Likewise.
	(lang_padding_statement_type): Likewise.
	(lang_add_fill): Now takes a "fill_type *" param.
	(lang_leave_output_section_statement): Likewise.
	(lang_do_assignments): Likewise.
	(lang_size_sections): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	* ldlang.c: Include ldgram.h after ldexp.h.
	(lang_output_section_statement_lookup): Adjust for fill_type change.
	(print_fill_statement): Likewise.
	(print_padding_statement): Likewise.
	(insert_pad): Now takes a "fill_type *" arg.
	(size_input_section): Likewise.
	(lang_size_sections_1): Likewise.
	(lang_size_sections): Likewise.
	(lang_do_assignments): Likewise.
	(lang_add_fill): Likewise.
	(lang_leave_output_section_statement): Likewise.
	(lang_leave_overlay_section): Likewise.
	(lang_leave_overlay): Likewise.
	Adjust all callers of the above function.
	* ldlex.l: Include ldgram.h after ldexp.h.  Allow hex numbers
	starting with "0X" as well as "0x".  Return bigint.str for hex
	numbers starting with "0x" or "0X", zero bigint.str otherwise.
	Always use base 16 for numbers starting with "$".
	* ldmain.c: Include ldgram.h after ldexp.h.
	* ldwrite.c (build_link_order): Use bfd_data_link_order in place
	of bfd_fill_link_order.
	* pe-dll.c: Adjust lang_do_assignments calls.
	* emultempl/elf32.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
	lang_add_assignment call.
	* emultempl/pe.em: Likewise.

2002-02-14  Phil Edwards  <pme@gcc.gnu.org>

	* ld.texinfo (VERSION scripts):  Symbol names are globbing patterns.
	* ldgram.y (lang_new_vers_regex):  Rename to lang_new_vers_pattern;
	the pattern in question is not a regexp.
	* ldlang.c:  Likewise.
	* ldlang.h:  Likewise.
	* ldlex.l (V_IDENTIFIER):  Allow '[', ']', '-', '!', and '^' also.

2002-02-12  Jakub Jelinek  <jakub@redhat.com>

	* ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
	* ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
	(exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
	* ldexp.c (exp_data_seg): New variable.
	(exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
	(fold_binary): Handle DATA_SEGMENT_ALIGN.
	(exp_fold_tree): Handle DATA_SEGMENT_END.
	Pass allocation_done when recursing instead of hardcoding
	lang_allocating_phase_enum.
	* ldexp.h (exp_data_seg): New.
	* ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
	(lang_size_sections): New.
	* ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
	* scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
	if COMMONPAGESIZE is defined.
	* emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
	* emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
	* emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
	libraries only.

2002-02-11  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.in: Regenerate.

2002-02-10  Daniel Jacobowitz  <drow@mvista.com>

	* lexsup.c: Remove strtoul declaration.

2002-02-10  Daniel Jacobowitz  <drow@mvista.com>

	* ldmain.c: Add prototype for main ().
	* lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
	* emultempl/lnk960.em (lnk960_choose_target): Function should
	take two arguments.

2002-02-10  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (entry_section): New initialised variable.
	(lang_finish): Use it.
	* ldlang.h (entry_section): Declare.
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
	entry_section to ".opd".

2002-02-09  Chris Demetriou  <cgd@broadcom.com>

	* ld.texinfo (Options): Add back in -nostdlib documentation,
	which had been inadvertently removed.

2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>

	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
	register section vma to a sane value after emitting error.  Make
	fatal conditions cause program exit when emitting message.

2002-02-08  Ivan Guzvinec <ivang@opencores.org>

	* configure.tgt: Add or32-*-rtems target.

2002-02-08  Alexandre Oliva  <aoliva@redhat.com>

	Contribute sh64-elf.
	2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
	* emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
	in OTHER_RELOCATABLE_SECTIONS.
	2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
	* emulparams/shelf32.sh (STACK_ADDR): Define.
	(OTHER_RELOCATABLE_SECTIONS): Renamed to...
	(OTHER_SECTIONS): this.	 Removed stack settings.
	* emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
	(OTHER_SECTIONS): Reset after sourcing shelf32.sh.
	2001-03-12  DJ Delorie	<dj@redhat.com>
	* emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
	relaxing if any shmedia or mixed sections are found.
	2001-03-07  DJ Delorie	<dj@redhat.com>
	* emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
	einfo.	Gracefully decline to output to non-elf formats.
	2001-03-06  Hans-Peter Nilsson	<hpn@redhat.com>
	* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
	Default to _end aligned to next multiple of 0x40000, plus 0x40000.
	* emulparams/shelf32.sh: Ditto.
	2001-01-14  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
	comment.
	2001-01-10  Ben Elliston  <bje@redhat.com>
	* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
	non-portable shell constructs. From Hans-Peter Nilsson.
	2001-01-09  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
	* Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
	dependencies to the shell script include chain.
	* Makefile.in: Regenerate.
	2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emultempl/sh64elf.em: Update and tweak comments.
	(sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
	make a .cranges section SEC_IN_MEMORY.
	2000-12-30  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emultempl/sh64elf.em
	(sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
	.cranges section found to be necessary; continue and set stored
	section contents flags for sections with non-mixed contents.
	Use a struct sh64_section_data container and sh64_elf_section_data
	to store contents-type flags.
	Remove unused update of "isec".
	(sh64_elf_${EMULATION_NAME}_after_allocation): Only process
	sections marked SHF_SH5_ISA32_MIXED.  Use sh64_elf_section_data to
	access contents-type flags.  Assert that the associated container
	is initialized.	 Use that container, not elf_gp_size, to hold size
	of linker-generated cranges contents.
	2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emultempl/sh64elf.em
	(sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
	there's already a .cranges section.  When section flag difference
	is found, don't NULL-check cranges a second time.  Tweak comments.
	(sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
	merging, not max size, as size of ld-generated .cranges contents.
	Don't set ELF section flags in output section.	When checking for
	needed .cranges descriptors, don't use a variable; compare
	incoming ELF section flags directly to SHF_SH5_ISA32_MIXED.  Tweak
	comments.
	2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emultempl/sh64elf.em: New file.
	* Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
	* Makefile.in: Regenerate.
	* emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
	(OTHER_RELOCATING_SECTIONS): Ditto.
	(EXTRA_EM_FILE): New, set to sh64elf if not set.
	* emulparams/shlelf32.sh: Stub out all settings except
	OUTPUT_FORMAT.	Source shelf32.sh.
	* emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
	OTHER_RELOCATING_SECTIONS.
	(OTHER_RELOCATING_SECTIONS): Remove .cranges.
	* emulparams/shlelf64.sh: Stub out all settings except
	OUTPUT_FORMAT.	Source shelf64.sh.
	2000-12-15  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
	.cranges section.
	(DATA_START_SYMBOLS): Define, provide ___data.
	(OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
	for consecutive .data section.
	(OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
	section after .data section.
	* emulparams/shlelf64.sh: Ditto.
	* emulparams/shelf32.sh: Ditto.
	(ALIGNMENT): Define to 8.
	* emulparams/shelf32.sh: Ditto.
	2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
	* configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
	built-in linker scripts.
	2000-11-30  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emulparams/shlelf64.sh: New.
	* emulparams/shelf64.sh: New.
	* configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
	targ_extra_emuls.
	* Makefile.am: Add support for shlelf64 and shelf64.
	* Makefile.in: Regenerate.
	2000-11-29  Hans-Peter Nilsson	<hpn@cygnus.com>
	* configure.tgt (sh64-*-elf*): Add shelf as default.
	Add shlelf to targ_extra_emuls.
	2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
	* emulparams/shelf32.sh: New file.
	* emulparams/shlelf32.sh: New file.
	* Makefile.am: Add support for shlelf32 and shelf32.
	* configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
	* Makefile.in: Regenerate.

2002-02-05  Hans-Peter Nilsson  <hp@axis.com>

	* ldlang.c (lang_reset_memory_regions): Rename from
	reset_memory_regions.  Change all callers.  Make public.
	* ldlang.h (lang_reset_memory_regions): Prototype.
	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
	lang_reset_memory_regions before lang_size_sections.
	* emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.

2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>

	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
	arithmetic when checking for too many global registers.

2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>

	* Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
	(ehppanbsd.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt (hppa*-*-netbsd*): New target.
	* emulparams/hppalinux.sh: Add comment to check other files
	that source this file it is modified, and list which
	files that do.
	* emulparams/hppanbsd.sh: New file.

2002-02-01  Geoffrey Keating  <geoffk@redhat.com>

	* scripttempl/xstormy16.sc: Don't allocate extra space for the
	stack.

2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>

	Support on-demand global register allocation from
	R_MMIX_BASE_PLUS_OFFSET relocs.
	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
	mmix_set_reg_section_vma.  Call
	_bfd_mmix_finalize_linker_allocated_gregs.
	(mmix_before_allocation): New function.
	(LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
	(LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
	* scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
	(.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
	before .MMIX.reg_contents.
	* emultempl/mmo.em (gldmmo_before_allocation): Define to default.
	(mmo_after_open): New function.
	(LDEMUL_AFTER_OPEN): Define to mmo_after_open.
	* emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting.  Add
	.MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.

2002-01-31  Ivan Guzvinec  <ivang@opencores.org>

	* emulparams/or32.sh: New file.
	* emulparams/or32elf.sh: New file.
	* scripttempl/or32.sc: New file.
	* configure.tgt : Add support for or32.
	* configure: Regenerate
	* Makefile.am: Add support for or32.
	* Makefile.in: Regenerate.
	* NEWS: Mention support for or32.
	* po/ld.pot: Regenerate.

2002-01-29  Chris Demetriou  <cgd@broadcom.com>
	    Mitch Lichtenberg  <mpl@broadcom.com>

	* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
	* emultempl/mipself.em: New file to handle MIPS ELF embedded
	reloc creation (ld --embedded-relocs).

2002-01-27  Daniel Jacobowitz  <drow@mvista.com>

	* configure: Regenerated.

2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>

	* Makefile.am (install): Depend on install-info.
	* Makefile.in: Regenerate.

2002-01-26  Christian Rose  <menthos@menthos.com>

	* ldmain.c (main): Use full sentences to ease translation.

2002-01-26  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/fr.po: Updated version.

2002-01-25  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/es.po: Updated version.

2002-01-25  Andreas Jaeger  <aj@suse.de>

	* ldlex.l (yy_input): Correct error check.

2002-01-25  Alan Modra  <amodra@bigpond.net.au>

	* ldmisc.c (demangle): Put back dots when string not demangled.

2002-01-22  Richard Henderson  <rth@redhat.com>

	* emulparams/elf64alpha.sh (NOP): Use unop.

2002-01-21  Andreas Jaeger  <aj@suse.de>

	* ldlex.l: Use fread instead of read.

2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>

	* configure.tgt (ia64-*-netbsd*): New target.

2002-01-21  H.J. Lu <hjl@gnu.org>

	* emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
	0.
	* emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.

2002-01-18  Andreas Jaeger  <aj@suse.de>

	* ldver.c (ldversion): Update year.

2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/ld.pot: Regenerate.

2002-01-16  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
	* Makefile.in: Regenerate.
	* emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
	* emultempl/ppc64elf.em: New file.

2002-01-15  DJ Delorie  <dj@redhat.com>

	* scripttempl/pe.sc: Add support for constructor priorities.

2002-01-07  Marek Michalkiewicz  <marekm@amelek.gda.pl>

	* emulparams/avr1200.sh (DATA_START): Define as 0x60.
	* emulparams/avr23xx.sh: Likewise.
	* emulparams/avr4433.sh: Likewise.
	* emulparams/avr44x4.sh: Likewise.
	* emulparams/avr85xx.sh: Likewise.
	* emulparams/avrmega103.sh: Likewise.
	* emulparams/avrmega161.sh: Likewise.
	* emulparams/avrmega603.sh: Likewise.
	* scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.

2002-01-08  Alexandre Oliva  <aoliva@redhat.com>

	* ldlang.c (walk_wild_section): Exclude object file if enclosing
	archive is excluded.

2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>

	* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
	(eshelf_nbsd.c): New rule.
	(eshlelf_nbsd.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt (sh*le-*-netbsdelf*): New target.
	(sh*-*-netbsdelf*): New target.
	* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
	* ld/emulparams/shelf_nbsd.sh: New emulation.
	* ld/emulparams/shlelf_nbsd.sh: New emulation.

2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/es.po: New file: Spanish translation.
	* configure.in (ALL_LINGUAS): Add es.
	* configure: Regenerate.

2002-01-06  John Marshall  <jmarshall@acm.org>

	* ld.texinfo: Note that --emit-relocs is currently only
	implemented for ELF.

2002-01-05  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
	of bfd_section_list_remove and bfd_section_list_insert macros.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
	* emultempl/mmo.em (mmo_place_orphan): Likewise.

2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>

	* configure.tgt (x86_64-*-netbsd*): New target.

2001-12-21  Tom Rix  <trix@redhat.com>

	(gld*_create_output_section_statements): New function.
	For -binitfini support.
	* emultempl/aix.em (gld*_before_parse): Fix comment.
	* emultempl/aix.em (gld*_parse_args): Fix comment.

2001-12-20  Jason Thorpe  <thorpej@wasabisystems.com>

	* configure.tgt (mips*-dec-netbsd*): Delete alias for
	mips*el-*-netbsd*.
	(sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.

	* configure.tgt (arm-*-netbsdelf*): Add target.
	(arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
	* emulparams/armelf_nbsd.sh: Added.
	* Makefile.am: Add rules for earmelf_nbsd.
	* Makefile.in: Regenerate.

2001-12-19  Andreas Jaeger  <aj@suse.de>,
	    Susanne Oberhauser <froh@suse.de>

	* configure.host: Add rules for x86_64-*linux-gnu.  Change
	s390x-linux entry to use gcc to report configuration, replace gcc
	with $CC in s390-linux

2001-12-19  Andreas Jaeger  <aj@suse.de>

	* ld.texinfo (VERSION): Fix markup.

2001-12-18  matthew green  <mrg@eterna.com.au>

	* Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
	(m68kelfnbsd.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt (m68*-hp-netbsd*): Renamed to ..
	(m68*-*-netbsd*4k*): .. this.
	(m68*-*-netbsdelf*): New target.
	(m68*-*-netbsd*): Also include ELF support.
	(m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
	* emulparams/m68kelfnbsd.sh: New emulation.

2001-12-18  Jakub Jelinek  <jakub@redhat.com>

	* ldgram.y (vers_node): Support anonymous version tags.
	* ldlang.c (lang_register_vers_node): Ensure anonymous version
	tag is not defined together with non-anonymous versions.
	* ld.texinfo: Document it.

2001-12-18  Nick Clifton  <nickc@cambridge.redhat.com>

	* po/tr.po: New file: Turkish translation.
	* configure.in (ALL_LINGUAS): Add tr.
	* configure: Regenerate.

2001-12-17  Jason Thorpe  <thorpej@wasabisystems.com>

	* Makefile.am: Add rules for eelf64alpha_nbsd.
	* Makefile.in: Regenerate.
	* configure.tgt (alpha*-*-netbsd*): Set
	targ_emul to elf64alpha_nbsd.
	* emulparams/elf64alpha_nbsd.sh: Added.

2001-12-17  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
	section_tail when fiddling with section list.
	(gld${EMULATION_NAME}_list_options): Ensure sentences aren't
	broken into separate strings to make translation easier.
	* emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
	fiddling with section list.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.

2001-12-16  Hans-Peter Nilsson  <hp@bitrange.com>

	* scripttempl/mmo.sc: Add .debug_ranges to listed sections.

2001-12-15  Alan Modra  <amodra@bigpond.net.au>

	* ldmain.c (main): Initialise link_info.eh_frame_hdr.

2001-12-13  Jakub Jelinek  <jakub@redhat.com>

	* emultempl/elf32.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	(OPTION_EH_FRAME_HDR): Define.
	(longopts): Add --eh-frame-hdr.
	(parse_args): Handle it.
	(list_options): Add --eh-frame-hdr to help.
	* emultempl/hppaelf.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	* scripttempl/elf.sc (.eh_frame_hdr): Add.

2001-12-13  Alan Modra  <amodra@bigpond.net.au>

	* lexsup.c (parse_args): Don't pass shortopts to second call to
	getopt functions.  Restore optind rather than decrementing before
	second call.  Remove errind as it now duplicates last_optind.

2001-12-11  Christopher Faylor  <cgf@redhat.com>

	* emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.

2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

2001-10-01  Christopher Faylor <cgf@cygnus.com>

	* Makefile.in (LIB_PATH): Make configurable.
	(GENSCRIPTS): Set LIB_PATH in environment.
	* configure.in: Substitute LIB_PATH.
	* configure: Regenerate.
	* configure.tgt (*cygwin): Set LIB_PATH for cross build.
	* configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.

2001-12-07  Nick Clifton  <nickc@cambridge.redhat.com>

	* lexsup.c (ld_options): Insert 'PROGRAM' into the text string
	describing the -N option so that it is easier to translate into
	foreign languages.

2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>

	* emultempl/pe.em (..._list_options): Replace multiple fprintf
	statements describing a single option with a single, newline
	escaped fprintf.  This allows better translation into other
	languages.

	* ldmain.c (add_archive_element): Combine multiple strings
	into a single string to permit better translation into other
	languages.

2001-12-05  Tom Rix  <trix@redhat.com>

	* Makefile.am: Remove eaixppc64.
	* Makefile.in: Regenerate.

2001-12-04  Tom Rix  <trix@redhat.com>

	* emultempl/aix.em (choose_target): Change default target to
	OUTPUT_FORMAT for ppcmacos.  Add braces to remove compiler
	warning.
	(gld*_read_file):  Fix typo.
	(change_symbol_mode): Add prototype.
	(is_syscall): Same.

	* emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
	* emulparams/aixrs6.sh : Same.
	* emulparams/ppcmacos.sh : Same.
	* emulparams/aixppc64.sh : Delete file.
	* emultempl/aix.em : Formatting changes.

2001-12-04  Hans-Peter Nilsson  <hp@axis.com>

	* emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
	(OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
	__Sbss.
	(OTHER_END_SYMBOLS): Fix formatting.
	* emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
	(OTHER_END_SYMBOLS): Fix formatting.

2001-12-04  Alan Modra  <amodra@bigpond.net.au>

	* ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.

2001-12-02  Tom Rix  <trix@redhat.com>

	* configure.tgt : Remove eaixppc64 emulations.
	* Makefile.in : Remove eaixppc64.c
	* ldemul.c (ldemul_choose_target): New parameters argc, argv.
	(ldemul_default_target): Same.
	* emultempl/gld960.em (gld960_choose_target):  Same.
	* emultempl/gld960c.em (gld960_choose_target):  Same.
	* scripttempl/aix.sc: Remove OUTPUT_FORMAT.
	* emultempl/aix.em (is_syscall): syscall_mask now a variable.
	* emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
	* emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
	* emultempl/aix.em (choose_target): New function.  Handle emulation of
	-b32 and -b64.

2001-11-27  H.J. Lu <hjl@gnu.org>

	* emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
	* emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
	* emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
	* emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.

	* scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
	is not empty.
	(SDATA): Likewise.
	(REL_SDATA): Likewise.
	(REL_SBSS): Likewise.
	(REL_SDATA2): Likewise.
	(REL_SBSS2): Likewise.
	(SBSS2): Define if ${NO_SMALL_DATA} is not empty.
	(SDATA2): Likewise.

2001-11-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
	destructor in rom.
	* scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.

2001-11-22  H.J. Lu  <hjl@gnu.org>

	* Makefile.in: Regenerated with automake based on automake
	1.4-8 in RedHat 7.1.

2001-11-22  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
	(config.status): Delete rule.
	Add extra dependencies to cover sourced emulparams files.
	* Makefile.in: Regenerate.

	* scripttempl/elf.sc: Order <section>, <section>.* and
	corresponding linkonce sections as seen in input files.
	Formatting fixes.  Zero vma of all sections if not relocating.
	(STACK): Define and insert if STACK_ADDR defined.
	(OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	(OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
	(OTHER_READWRITE_SECTIONS): Likewise.
	(OTHER_GOT_SECTIONS): Likewise.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_BSS_SECTIONS): Likewise.
	* scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise.
	* scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
	(OTHER_READWRITE_SECTIONS): Likewise

	* emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(STACK_ADDR): Define.
	* emulparams/armelf_oabi.sh: As for armelf.sh.
	* emulparams/elf32mcore.sh: As for armelf.sh.
	* emulparams/h8300elf.sh: As for armelf.sh.
	* emulparams/mn10200.sh: As for armelf.sh.
	* emulparams/shelf.sh: As for armelf.sh.

	* emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_END_SYMBOLS): Define.
	* emulparams/m32relf.sh: As for elf32fr30.sh.
	* emulparams/h8300helf.sh: As for elf32fr30.sh.
	* emulparams/h8300self.sh: As for elf32fr30.sh.

	* emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
	defines with RELOCATING test.
	(OTHER_SDATA_SECTIONS): Likewise.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_END_SYMBOLS): ..this.
	* emulparams/crislinux.sh: As for criself.sh.

	* emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
	if not relocating.
	(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
	(OTHER_SECTIONS): ..this.  Zero vma if not relocating.  Order
	normal and linkonce sections as seen in input files.
	* emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
	(TEXT_DYNAMIC): Likewise.
	(INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
	(OTHER_SDATA_SECTIONS): Likewise.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
	* emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
	(OTHER_PLT_RELOC_SECTIONS): Likewise.
	(OTHER_READONLY_SECTIONS): Likewise.  Order normal and linkonce
	sections as seen in input files.
	* emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
	* emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
	if not relocating.
	(OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
	(OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
	* emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
	(OTHER_SECTIONS): Instead, use this..
	(OTHER_END_SYMBOLS): ..and this.

	* emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
	* emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
	* emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
	* emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
	* emulparams/elf32ppclinux.sh: Likewise.
	* emulparams/elf32ppcsim.sh: Likewise.
	* emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
	* emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
	* emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
	* emulparams/h8300self.sh: Likewise.
	* emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
	* emulparams/sh.sh: Comment.
	* emulparams/shl.sh: Source sh.sh, remove duplicates.
	* emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
	* emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.

2001-11-21  David Heine <dlheine@tensilica.com>
	    Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (map_input_to_output_sections): Replace "break"
	accidentally removed with 2001-08-03 change.
	(lang_gc_sections_1): Likewise.

2001-11-21  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (walk_wild_section): Move sec == NULL case out of loop.

2001-11-20  Angela Marie Thomas <angela@redhat.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
	of false when calling lang_size_sections.
	* emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.

2001-11-15  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
	function when LDEMUL_FINISH isn't set to the same name.  Don't
	call ${LDEMUL_FINISH}.
	(ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
	* emultempl/armelf.em (arm_elf_finish): Call
	gld${EMULATION_NAME}_finish.
	* emultempl/hppaelf.em (hppaelf_finish): Rename to
	gld${EMULATION_NAME}_finish.  Call bfd_elf32_discard_info and
	hppaelf_layout_sections_again if necessary.
	(need_laying_out): New var.
	(hppaelf_layaout_sections_again): Rename to
	hppaelf_layout_sections_again.  Clear need_laying_out.
	(PARSE_AND_LIST_OPTIONS): Format text.

2001-11-14  H.J. Lu  <hjl@gnu.org>

	* emultempl/armelf.em (arm_elf_finish): Renamed from
	gld${EMULATION_NAME}_finish.
	(LDEMUL_FINISH): Set to arm_elf_finish.

2001-11-14  Daniel Jacobowitz  <drow@mvista.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
	(struct ld_emulation_xfer_struct): Use it.

2001-11-13  Ross Alexander <ross.alexander@uk.neceur.com>

	* emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
	additional symbols referenced by newer crt0.o files from HP.

2001-11-12  Anthony Green  <green@redhat.com>

	* emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.

2001-11-12  Alfred M. Szmidt  <ams@kemisten.nu>

	* Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
	* Makefile.in: Regenerate.

2001-11-02  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* ld.texinfo: Use @command for commands, @option for options.
	* Makefile.am (POD2MAN): Use 'GNU Development Tools' for
	the page man title.
	* Makefile.in: Rebuild.

2001-11-04  Chris Demetriou  <cgd@broadcom.com>

	* configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
	Add support for targets.

2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>

	* configure.in (ALL_LINGUAS): Add "fr" and "sv"
	* configure: Regernate.
	* po/fr.po: New file.
	* po/sv.po: New file.

2001-11-01  NIIBE Yutaka  <gniibe@m17n.org>

	* configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
	as little endian default and to support big endian.

2001-11-01  Chris Demetriou  <cgd@broadcom.com>

	* ld.texinfo (Options): Document new option, -nostdlib.
	* lexsup.c (OPTION_NOSTDLIB): New definition.
	(ld_options): Add entry for "nostdlib".
	(parse_args): Handle OPTIONS_NOSTDLIB.
	* ldfile.c (ldfile_add_library_path): Don't add directories
	to the search path if they weren't specified on the command line
	and -nostdlib was specified.
	* ld.h (ld_config_type): New member only_cmd_line_lib_dirs.

2001-10-31  Nick Clifton  <nickc@cambridge.redhat.com>

	* lexsup.c (parse_args): Prevent infinite parsing loop when
	"-rpath.a" is specified on the command line.
	Replace calls to fprintf with calls to einfo.

2001-10-31  John Marshall  <jmarshall@acm.org>

	* ld.texinfo: A historical requirement that MEMORY and SECTIONS
	appear only once across all the linker scripts involved in a link
	invocation no longer applies.  Make the documentation reflect
	that.

2001-10-31  NIIBE Yutaka  <gniibe@m17n.org>

	* configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
	targets.
	(sh-*-linux*): Added targ_extra_libpath.

2001-10-31  David Heine  <dlheine@tensilica.com>

	* ldlang.c (lang_size_sections): Keep a valid output_offset field
	for padding statements.

2001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>

	* configure.tgt (mmix-*-*): New target.
	* Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
	Add dependencies to match.
	* emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
	emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
	scripttempl/mmo.sc: New files.
	* gen-doc.texi: @set MMIX.
	* ld.texinfo: Ditto.
	[MMIX] Add MMIX node.
	* Makefile.in: Regenerate.

2001-10-29  Kazu Hirata  <kazu@hxi.com>

	* ldlang.c: Fix a comment typo.

2001-10-23  Alan Modra  <amodra@bigpond.net.au>

	* configure.host: Move alpha*-*-linux-gnu* entry to generic
	entries, and match *-*-linux*.

2001-10-20  Alan Modra  <amodra@bigpond.net.au>

	* ldgram.y (mri_script_command): Surround processing of INCLUDE
	with ldlex_script, ldlex_popstate.
	(ifile_p1): Likewise.
	* ldlex.l (EOF): Don't BEGIN(SCRIPT).  Restore lineno from the
	correct slot.
	(lex_push_file): Save current lineno to lineno_stack.  Set lineno
	to 1.  Don't BEGIN(SCRIPT).
	(lex_redirect): Similarly.
	* ldmain.c (main): Set yydebug non-zero if YYDEBUG.

2001-10-20  Nick Clifton  <nickc@cambridge.redhat.com>

	* scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
	__EH_FRAME_END__ and accept eh frames into data section.
	Add ctor and dtor sections.

2001-10-19  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>

	* pe-dll.c (autofilter_objectlist): Add gcrt0.o.
	(auto-export): Fix indentation.

2001-10-18  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>

	* pe-dll.c (autofilter_objectlist):  Add startup objects
	for profiling.
	(auto-export): Constify char * p.
	Extract file basename and use strcmp rather than ststr
	for object lookup.

2001-10-18  Chris Demetriou  <cgd@broadcom.com>

	* ldmain.c (get_emulation): Improve comment about the handling
	of -mipsN options.

2001-10-17  Alan Modra  <amodra@bigpond.net.au>

	* po/POTFILES.in: Regenerate.

2001-10-16  Vassili Karpov  <malc@pulsesoft.com>

	* emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
	-z nocopyreloc and -z nocombreloc usage strings.

2001-10-12  Vassili Karpov  <malc@pulsesoft.com>

	* emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
	in usage.

2001-10-11  Aleksey Romanov <aromanov@ennovatenetworks.com>

	* scripttempl/armaout.sc: Place .bss section after end of aligned
	data section to match behaviour of aout code in constructrion of
	header.

2001-10-11  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>

	* pe-dll.c (autofilter_entry_type autofilter_liblist: Add
	startup files for mingw32 dlls to list.

2001-10-10  Chris Demetriou  <cgd@broadcom.com>

	* emultempl/elf32.em: Fix shell 'if' usage for portability.

2001-10-08  Aldy Hernandez  <aldyh@redhat.com>

	* configure.tgt (targ): Add arm9e-*-elf.

2001-10-05  H.J. Lu  <hjl@gnu.org>

	* genscripts.sh: Fix a typo in the last change.

2001-10-05  Jakub Jelinek  <jakub@redhat.com>

	* emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
	-z nocombreloc in usage.

2001-10-03  Jim Blandy  <jimb@redhat.com>

	* genscripts.sh: Include a comment at the top of each generated
	script, explaining its purpose.

2001-10-03  Vassili Karpov  <malc@pulsesoft.com>

	* emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
	* NEWS: Mention -z nocopyreloc.
	* ld.texinfo (Options): Describe nocopyreloc.

2001-10-03  Alan Modra  <amodra@bigpond.net.au>

	* configure: Regenerate.

2001-10-02  Alan Modra  <amodra@bigpond.net.au>

	* ldver.h (ld_program_version): Remove declaration.
	* lexsup.c (parse_args): Move printing of copyright message..
	* ldver.c (ldversion): .. to here.
	Use BFD_VERSION_STRING in place of BFD_VERSION.
	(ld_program_version): Remove.
	* Makefile.am (Makefile): Depend on bfd/configure.in.
	Run "make dep-am".
	* Makefile.in: Regenerate.

2001-09-30  Hans-Peter Nilsson  <hp@bitrange.com>

	* Makefile.am: Update dependencies with "make dep-am".
	* Makefile.in: Regenerate.

2001-09-29  John Reiser  <jreiser@BitWagon.com>

	* ldlang.c (lang_common): Conditionally inhibit Common allocation.
	* lexsup.c: Add --no-define-common commandline option.
	* ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
	* ldlex.l: Likewise.
	* ld.h: Add command_line.inhibit_common_definition.
	* ldmain.c (main): Initialize.
	* ld.texinfo: Document.

2001-09-26  Alan Modra  <amodra@bigpond.net.au>

	* ldmisc.c (USE_STDARG): Remove.
	(info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
	(einfo): Likewise.
	(minfo): Likewise.
	(lfinfo): Likewise.

	* ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
	declarations.  Update copyright.

2001-09-24  Charles Wilson  <cwilson@ece.gatech.edu>

	* pe-dll.c: Remove obsoleted declaration of
	pe_get_data_import_dll_name.
	(pe_create_import_fixup): Fix thinko.

	* ld.texinfo(enable-auto-import): Clarify the explanation.

2001-09-24  Nick Clifton  <nickc@cambridge.redhat.com>

	* pe-dll.c (pe_create_import_fixup): Revert previous patch.
	* emultemp/pe.em (pe_data_import_dll): Move definition outside of
	DLL_SUPPORT controlled code.

2001-09-24  Charles Wilson  <cwilson@ece.gatech.edu>

	* emultempl/pe.em(pe_data_import_dll): Make static.
	(pe_get_data_import_dll_name): New accessor function.
	* pe-dll.c(pe_create_import_fixup): call
	pe_get_data_import_dll_name() from pe.em, instead of
	directly accessing pe_data_import_dll variable from pe.em.

2001-09-18  Bruno Haible  <haible@clisp.cons.org>

	* deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
	(def_file_add_directive): Use ISSPACE instead of isspace.
	(def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
	isdigit/isxdigit/isalpha/isalnum.
	* emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
	(gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
	* emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
	(gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
	isalnum.
	* emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
	(gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
	isupper/tolower.
	* emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
	(gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
	* ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
	(ctor_prio): Use ISDIGIT instead of isdigit.
	* ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
	(ldfile_open_file_search): Use ISALPHA instead of isalpha.
	(ldfile_add_arch): Use ISUPPER/TOLOWER instead of
	isupper/tolower.
	* ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
	(stricpy): Use TOLOWER instead of isupper/tolower.
	(lang_leave_overlay_section): Use ISALNUM instead of isalnum.
	* ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
	(lex_warn_invalid): Use ISPRINT instead of isprint.
	* ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
	(main): For gettext, also set the LC_CTYPE locate facet.
	(add_keepsyms_file): Use ISSPACE instead of isspace.
	* lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
	(is_num, parse_args): Use ISDIGIT instead of isdigit.
	* mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
	(gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
	* mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
	(gldppcmacos_read_file): Use ISSPACE instead of isspace.
	* pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
	(quoteput): Use ISSPACE instead of isspace.
	(pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
	instead of isalnum.

2001-09-18  Alan Modra  <amodra@bigpond.net.au>

	* deffilep.y (def_stash_module): Constify "name" param.

	* pe-dll.c: Replace CONST with const throughout.
	(quick_symbol): Constify "n1", "n2", "n3" params.
	(make_singleton_name_thunk): Constify "import" param.  Make
	"buffer_len" a size_t.
	(make_import_fixup_entry): Constify "name", "fixup_name",
	"dll_symname" params.
	(pe_get16): Cast args of bfd_seek.  Replace bfd_read with bfd_bread.
	(pe_get32): Likewise.
	(pe_implied_import_dll): Likewise.

	* emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
	(sort_by_section_name): Likewise.

	* emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
	(make_import_fixup): Cast printf arg, rel->address to long rather
	than int.
	(gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.

2001-09-15  Alan Modra  <amodra@bigpond.net.au>

	* ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
	defines BufferSize.  Increase buffer size by one.

2001-09-14  Ralf Habacker <Ralf.Habacker@freenet.de>

	* pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.

2001-09-14  Kevin Lo <kevlo@openbsd.org>

	* configure.tgt: Add arm-openbsd target.

2001-09-12  H.J. Lu  <hjl@gnu.org>

	* Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
	eelf64lppc.o to ...
	(ALL_64_EMULATIONS): Here.
	* Makefile.in: Regenerated.

2001-09-12  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>

	* emultempl/pe.em(make_import_fixup): change signature to
	take asection as well as arelec; we need this for proper
	error reporting.  Only call pe_create_import_fixup() if
	there is no attempt to add a constant addend to the reloc;
	otherwise, report error condition.
	* pe-dll.c(pe_walk_relocs_of_symbol): change signature,
	since final argument is a pointer to make_import_fixup().
	Change call to cb() to match make_import_fixup() signature.
	(make_import_fixup_mark): make buffer_len unsigned.
	* pe-dll.h: change signature of pe_walk_relocs_of_symbol.

2001-09-12  Charles Wilson  <cwilson@ece.gatech.edu>

	* ld.texinfo: add verbose documentation for auto-import
	direct-addressing workaround, to compliment the terse
	error message.

2001-09-12  Andrew MacLeod  <amacleod@redhat.com>

	* scripttempl/v850.sc: Add gcc_except_table sections.

2001-09-11  Jeffrey A Law  (law@cygnus.com)

	* emulparams/h8300helf.sh: Move stack to a much higher memory address.
	* emulparams/h8300self.sh: Similarly.

2001-09-05 Danny Smith <dannysmith@users.souceforge.net>

	* ld.texinfo (Options, --stack): Correct default value for stack
	reserve.

2001-09-05  Tom Rix <trix@redhat.com>

	* emultempl/aix.em : Handle import file XMC_XO and syscall symbols.

2001-09-03  Andreas Jaeger  <aj@suse.de>

	* emultempl/beos.em: Declare prototypes for comparions functions,
	adjust definitions.

2001-09-02  Andreas Jaeger  <aj@suse.de>

	* emultempl/aix.em: Add missing prototype.
	* emultempl/lnk960.em: Likewise.
	* emultempl/vanilla.em: Likewise.
	* emultempl/armcoff.em: Likewise.
	* emultempl/armelf_oabi.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/gld960.em: Likewise.

	* emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
	for prototype declaration.

2001-08-31  Eric Christopher  <echristo@redhat.com>
	    Jason Eckhardt  <jle@redhat.com>

	* ldmain.c (get_emulation): Add support for -mips32 and -mips64.

2001-08-31  Andreas Jaeger  <aj@suse.de>

	* emultempl/pe.em: Add missing prototypes.
	(gld_${EMULATION_NAME}_after_open): Remove extra args to
	pe_find_data_imports.
	(pr_sym): Add unused attribute.

2001-08-29  Joel Sherrill <joel@OARcorp.com>

	* configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
	default from coff to elf.

2001-08-29  Jeff Law <law@redhat.com>

	* emulparams/h8300helf.sh: Resync with h8300elf.sh.  Update
	ARCH specification.
	* emulparams/h8300self.sh: Similarly.

2001-08-28  J"orn Rennecke <amylaar@redhat.com>

	* Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
	eh8300self.o .
	(eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
	* configure.tgt (h8300-*-elf*): New case.
	* emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
	* emulparams/h8300self.sh: New file.
	* Makefile.in: Regenerated.

2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>

	* ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
	with macro name.

2001-08-27  Linus Nordberg  <linus@swox.com>
	    Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
	(eelf64ppc.c, eelf64lppc.c): Add make targets.
	Run "make dep-am"
	* Makefile.in: Regenerate.
	* configure.tgt: Add powerpc64 support.  Move pdp11, pjl, pj
	entries to correct alphabetical position.
	* emulparams/elf64ppc.sh: New.
	* emulparams/elf64lppc.sh: New.

2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>

	* ldmain.c (main): Declare BSIZE as static.

2001-08-23  Jakub Jelinek  <jakub@redhat.com>

	* emultempl/elf32.em (place_orphan): Place orphan .rel* sections
	into .rel.dyn resp. .rela.dyn if combreloc.
	(get_script): If .x linker script is equal to .xn, only put it
	once into the binary.
	Add .xc and .xsc scripts.
	(parse_args): Handle -z combreloc and -z nocombreloc.
	* scripttempl/elf.sc (.rela.sbss): Fix a typo.
	For .xc and .xsc scripts put all .rel* or .rela* input sections
	but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
	* genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
	is elf.
	Strip trailing whitespace from script.
	Generate .xc and .xsc scripts if requested.
	* ldmain.c (main): Initialize link_info.combreloc and
	link_info.spare_dynamic_tags.
	* lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
	(ld_options): Add --spare-dynamic-tags option.
	(parse_args): Likewise.
	* ld.texinfo: Document -z combreloc and -z nocombreloc.
	* ldint.texinfo: Document .xc and .xsc linker scripts.
	* NEWS: Add notes about -z combreloc and SHF_MERGE.

2001-08-22  H.J. Lu  <hjl@gnu.org>

	* emulparams/elf32fr30.sh: Add a newline.

2001-08-21  Andreas Jaeger  <aj@suse.de>

	* deffilep.y: Add missing prototypes.
	* pe-dll.c: Likewise.

2001-08-20  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (insert_pad): Fix typos in last patch.

	* ldlang.c: When traversing lang_statement_union_type lists,
	consistently use "header.next" rather than "next".
	* mpw-eppcmac.c: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/pe.em: Likewise.
	* ldlang.h (union lang_statement_union): Remove "next" field.

	* ldlang.c (insert_pad): Use offsetof macro.
	(lang_size_sections): Always neuter padding statements.
	* emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.

	* pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
	passed to lang_size_sections.
	(pe_exe_fill_sections): Likewise.
	* emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
	(gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.

2001-08-18  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/aix.em: Formatting fixes.

2001-08-18  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (insert_pad): Make use of an existing pad statement if
	available.  Move code calculating alignment, adjusting section
	alignment power, and adjusting dot to ..
	(size_input_section): .. here.  Remove unused relax param.
	(lang_size_sections): Change boolean `relax' param to boolean *.
	Adjust call to size_input_section.  Make use of insert_pad to
	place pad after the assignment statement.  If relaxing, zap
	padding statements.
	(reset_memory_regions): Reset output_bfd section sizes too.
	(relax_again): Move to..
	(lang_process): ..here.  Adjust call to lang_size_sections, and
	remove duplicated code.
	* ldlang.h (lang_size_sections): Change `relax' param to boolean *.

2001-08-17  Alan Modra  <amodra@bigpond.net.au>

	* ld.texinfo: Document that fill values now use the four least
	significant bytes.
	* emulparams/elf32fr30.sh (NOP): Update.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf_i386.sh: Likewise.
	* emulparams/elf_i386_be.sh: Likewise.
	* emulparams/elf_i386_chaos.sh: Likewise.
	* emulparams/elf_i386_ldso.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/i386moss.sh: Likewise.
	* emulparams/i386nw.sh: Likewise.
	* emulparams/m68kelf.sh: Likewise.
	* scripttempl/elf.sc: Update NOP comment.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/nw.sc: Likewise.

2001-08-15  Tom Rix <trix@redhat.com>

	* ldgram.y (saved_script_handle): Initialize to NULL.
	* ldmain.c (main): Change check on saved_script_handle.

2001-08-14  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em: Formatting fixes.
	(output_prev_sec_find): Test for bfd_ind_section too;  do so by
	looking at sec->owner.
	(output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
	(gld${EMULATION_NAME}_place_orphan): Add a few comments.  Remove
	unused code, and reorganize orphan section placement code.

	* ldlang.c (wild_doit): Rename to lang_add_section.
	* ldlang.h: Here too.
	* mpw-elfmips.c: And here.
	* emultempl/beos.em: And here.
	* emultempl/elf32.em: And here.
	* emultempl/hppaelf.em: And here.
	* emultempl/pe.em: And here.

2001-08-13  Richard Henderson  <rth@redhat.com>

	* emultempl/needrelax.em: New file.
	* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
	* Makefile.am (eelf64_ia64.c): Depend on it.
	* Makefile.in: Rebuild.

2001-08-13  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
	output_section is set non-NULL.

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
	`true' for SEC_EXCLUDE sections so that the generic code doesn't
	needlessly create an output_section_statement.  Treat a correctly
	named output_section_statement with NULL bfd_section as compatible.

2001-08-13  Hans-Peter Nilsson  <hp@bitrange.com>

	* emultempl/generic.em: Support EXTRA_EM_FILE.
	(ld_${EMULATION_NAME}_emulation): Support emulation parameters
	LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
	LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
	LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
	LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
	LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
	LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
	LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
	LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
	LDEMUL_FIND_POTENTIAL_LIBRARIES.

2001-08-12  Richard Henderson  <rth@redhat.com>

	* scripttempl/elf.sc, scripttempl/elfd30v.sc,
	scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
	scripttempl/v850.sc: Keep .jcr data.

2001-08-12  H.J. Lu  <hjl@gnu.org>
	    Andrew Haley  <aph@cambridge.redhat.com>
	    Nick Clifton  <nickc@redhat.com>

	* ldgram.y (had_script): Change name to saved_script_handle.
	Change type to file handle.
	* ld.h (had_script): Rename and retype.
	* ldfile.c (ldfile_open_command_file): Save the file handle
	used in saved_script_handle.
	* lexsup.c (parse_args): Do not allow -c option to alter
	saved_script_handle.
	* ldmain.c (main): Print out the linker script used if
	--verbose is given.  Check saved_script_handle to obtain the
	external linker script used, or if NULL, dump the builtin
	script.
	* ld.texinfo: Document that --verbose now dumps the linker
	script used, regardless of whether it was an internal or an
	external script.

2001-08-10  Andreas Jaeger  <aj@suse.de>

	* configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
	to build warnings.
	* configure: Regenerate.

2001-08-09  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/elf32.em (output_prev_sec_find): Add missing prototype.

	* scripttempl/elf.sc: Move non-text .dynamic section before
	.plt/.got/.sdata* group.
	(OTHER_GOT_SECTIONS): Move to immediately after .got.
	(OTHER_SDATA_SECTIONS): Add.
	* emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
	OTHER_GOT_SECTIONS.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32b4300.sh: Likewise.
	* emulparams/elf32bmip.sh: Likewise.
	* emulparams/elf32bmipn32.sh: Likewise.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Likewise.
	* emulparams/elf32l4300.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Likewise.
	* emulparams/elf64bmip.sh: Likewise.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Likewise.

2001-08-08  Alan Modra  <amodra@bigpond.net.au>

	* genscripts.sh: Source the emulparams script before each output
	script is generated so that variables like `RELOCATING' may affect
	variables defined in the emulparams script.

2001-08-04  Alan Modra  <amodra@bigpond.net.au>

	* emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
	order.

	* emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
	ie. iterate over wild_statement.section_list.
	(gld${EMULATION_NAME}_place_orphan): Likewise.

2001-08-03  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
	.fini[0-4] sections used by _exit
	(CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
	(*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
	* scripttempl/elfm68hc11.sc: Likewise.

2001-08-03  H.J. Lu  <hjl@gnu.org>

	* emultempl/beos.em (init): Add the missing initialization.

2001-08-03  Alan Modra  <amodra@bigpond.net.au>

	* ld.texinfo (Input Section Basics): Clarify ordering of output
	sections.
	* ldlang.c (callback_t): Add wildcard_list param.
	(walk_wild_section): Remove "section" param.  Rewrite for
	lang_wild_statement_type change.  Remove unique_section_p test.
	(walk_wild_file): Remove "section" param.
	(walk_wild): Remove "section" and "file" params.
	(lang_gc_wild): Likewise.
	(wild): Likewise.  Modify for lang_wild_statement_type change.
	(wild_sort): Likewise.  Add "sec" param.
	(gc_section_callback): Likewise.
	(output_section_callback): Likewise.  Do unique_section_p test.
	(map_input_to_output_sections): Modify call to wild.
	(lang_gc_sections_1): Likewise.
	(print_wild_statement): Modify for lang_wild_statement_type
	change.
	(lang_add_wild): Replace filename, filenames_sorted param with
	filespec.  Replace section_name, sections_sorted,
	exclude_filename_list with section_list.
	* ldlang.h (lang_add_wild): Here too.
	(lang_wild_statement_type): Replace section_name, sections_sorted,
	and exclude_filename_list with section_list.
	* ldgram.y (current_file): Delete.
	(%union): Add wildcard_list.
	(file_NAME_list): Set type to wildcard_list.  Build a linked list
	rather than calling lang_add_wild for each entry.
	(input_section_spec_no_keep): Call lang_add_wild here instead.
	* ld.h (struct wildcard_list): Declare.
	* mri.c (mri_draw_tree): Modify to suit new lang_add_wild.

2001-08-02  Charles Wilson  <cwilson@ece.gatech.edu>

	* ldmain.c (main): initialize link_info.pei386_auto_import
	* pe-dll.c: new tables for auto-export filtering
	(auto_export): change API, pass abfd for contextual filtering.
	Loop thru tables of excluded symbols instead of comparing
	"by hand".

2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>

	* pe-dll.c: new variable pe_dll_enable_extra_debug. New
	static variable current_sec (static struct sec *). Add
	forward declaration for add_bfd_to_link.
	(process_def_file): Don't export undefined symbols. Do not
	export symbols starting with  "_imp__".  Call auto_export()
	with new API.
	(pe_walk_relocs_of_symbol): New function.
	(generate_reloc): add optional extra debugging
	(pe_dll_generate_def_file): eliminate extraneous initial blank
	line in output
	(make_one): enlarge symtab to make room for __nm__ symbols
	(DATA auto-import support).
	(make_singleton_name_thunk): New function.
	(make_import_fixup_mark): New function.
	(make_import_fixup_entry): New function.
	(pe_create_import_fixup): New function.
	(add_bfd_to_link): Specify that 'name' argument is a CONST
	char *.
	* pe-dll.h: declare new variable pe_dll_extra_pe_debug;
	declare new functions pe_walk_relocs_of_symbol and
	pe_create_import_fixup.
	* emultempl/pe.em: add new options --enable-auto-import,
	--disable-auto-import, and --enable-extra-pe-debug.
	(make_import_fixup): New function.
	(pe_find_data_imports): New function.
	(pr_sym): New function.
	(gld_${EMULATION_NAME}_after_open): Add optional extra pe
	debugging. Call pe_find_data_imports.  Mark .idata as DATA, not
	CODE.

2001-08-02  Charles Wilson  <cwilson@ece.gatech.edu>

	* ld.texinfo: add additional documentation for
	--export-all-symbols.  Document --out-implib,
	--enable-auto-image-base, --disable-auto-image-base,
	--dll-search-prefix, --enable-auto-import, and
	--disable-auto-import.
	* ldint.texinfo: Add detailed documentation on auto-import
	implementation.

2001-07-30  Nick Clifton  <nickc@cambridge.redhat.com>

	* ld.texinfo (Simple Assignments): Fix computation in SECTIONS
	example.

2001-07-24  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am: Update dependencies with "make dep-am".
	* Makefile.in: Regenerate

2001-07-23  Alan Modra  <amodra@bigpond.net.au>

	* ldcref.c (check_section_sym_xref): New function.
	(check_nocrossrefs): Call it.
	(check_nocrossref): Interate over h->refs here instead of..
	(check_refs): ..here.  Pass in the symbol name, section, and bfd
	rather than hash_entry pointers.
	(struct check_refs_info): Keep symbol name rather than hash entry.
	Remove "same".
	(check_reloc_refs): Tweak for above changes in check_refs_info.
	Only report references to section syms when symname is NULL to
	prevent duplicate messages for the same reloc.

2001-07-19  Nick Clifton  <nickc@cambridge.redhat.com>

	* ldexp.c (exp_print_tree): Use stderr if config.map_file is not
	available.  Do not print NULL trees.
	(exp_print_token): Print unknown tokens with values > 126 as
	decimal values not ASCII characters.

	* ldlang.c (lang_leave_overlay): If a region is specified assign
	it to all sections inside the overlay unless they have been
	assigned to the own, non-default, memory region.

	* README: Add header for consistency with other README files.

2001-07-14  H.J. Lu  <hjl@gnu.org>

	* emultempl/elf32.em (output_prev_sec_find): Never return
	bfd_abs_section_ptr, bfd_com_section_ptr nor
	bfd_und_section_ptr.

2001-07-14  Nick Clifton  <nickc@cambridge.redhat.com>

	* Makefile.am (em32relf.c): Change dependency from generic.em to
	elf32.em.
	* Makefile.in: Regenerate.

2001-07-14  matthew green  <mrg@eterna.com.au>

	* configure.tgt (i386-*-netbsdelf*): New target.
	(i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'

2001-07-13  Jakub Jelinek  <jakub@redhat.com>

	* emultempl/elf32.em (output_prev_sec_find): New.
	(place_orphan): Use it.

2001-07-11  H.J. Lu  <hjl@gnu.org>

	* ldmain.c (main): Fix typos in the last change.

2001-07-11  Jakub Jelinek  <jakub@redhat.com>

	* ldmain.c (main): Disallow -F and -f without -shared.

2001-07-11  Nick Clifton  <nickc@cambridge.redhat.com>

	* emultempl/pe.em (after_open): Check for the output_bfd not
	having any coff_data structure allocated to it.

2001-07-09  David O'Brien  <obrien@FreeBSD.org>

	* emultempl/elf32.em: Do not assuming that contents of the buffer
	returned from basename function will remain unchanged accross other
	function calls.

2001-07-03  H.J. Lu  <hjl@gnu.org>

	* scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
	2001-07-03. It creates dynamic entries even for static binaries.

2001-07-03  Jakub Jelinek  <jakub@redhat.com>

	* scripttempl/elf.sc (DYNAMIC_PAD): New variable.
	(DYNAMIC): Use it to reserve few dynamic entries for
	post-linking tools.

2001-06-27  Alan Modra  <amodra@bigpond.net.au>

	* emulparams/hppa64linux.sh: New file.
	* configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
	* Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
	(ehppa64linux.c): Add rule to make it.
	Run "make dep-am".
	* Makefile.in: Regenerate.

2001-06-21  Hans-Peter Nilsson  <hp@axis.com>

	* ld.texinfo (Options, -r): Mention restrictions when using
	different object formats.

2001-06-19  Hans-Peter Nilsson  <hp@axis.com>

	* ldlang.c (lang_check): Emit fatal error if relocatable link
	between different object flavours with relocations in input.

2001-06-19  H.J. Lu  <hjl@gnu.org>

	* ld.texinfo (-E, --export-dynamic): Mention --version-script.
	(--version-script): Mention the language support.

2001-06-19  H.J. Lu <hjl@gnu.org>

	* ldlang.c (lang_check): Revert the change mode on 2001-06-15.

2001-06-18  H.J. Lu <hjl@gnu.org>

	* Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
	(diststuff): Add $(MANS).
	* Makefile.in: Regenerated.

	* ld.1: Removed.

2001-06-18  Hans-Peter Nilsson  <hp@axis.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
	* mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
	* ld.h (args_type): Remove member export_dynamic.  All users
	changed to use struct bfd_link_info member.

	* Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
	$(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
	* Makefile.in: Regenerate.

2001-06-18  H.J. Lu  <hjl@gnu.org>

	* ldlang.c (init_os): Add the newline to the einfo call.
	(lang_check): Likewise.
	(lang_do_version_exports_section): Likewise.

2001-06-15  H.J. Lu  <hjl@gnu.org>

	* lexsup.c (parse_args); Save optind to report unrecognized
	option.

2001-06-15  Hans-Peter Nilsson  <hp@axis.com>

	* ldlang.c (lang_check): Emit fatal error if relocatable link
	between different object flavours.

	* lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
	Set new link_info member export_dynamic.
	* ldmain.c (main): Initialize new link_info member export_dynamic.

2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>

	* ldlang.c (walk_wild): Only call walk_wild_file if
	lookup_name returns something.
	(lookup_name): If load_symbols fails, return NULL.
	(load_symbols): Change to a boolean function.
	(open_input_bfds): If load_symbols fails then do not make the
	executable.

2001-06-08  Alan Modra  <amodra@bigpond.net.au>

	* ldlang.c (record_bfd_errors): Remove.

	* emultempl/aix.em: Fix copyright dates.

2001-06-07  Andreas Jaeger  <aj@suse.de>

	* elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
	(TEXT_START_ADDR): Likewise.

2001-06-06  Martin Schwidefsky <schwidefsky@de.ibm.com>

	* configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.

2001-06-05  Danny Smith  <danny_r_smith_2001@yahoo.co.nz>

	* emultempl/pe.em (init): Reduce default stack reserve to 0x200000.

2001-05-31  H.J. Lu  <hjl@gnu.org>

	* ldlang.c (open_input_bfds): Don't change the bfd error
	handler whilst loading symbols.

2001-05-28  Nick Clifton  <nickc@cambridge.redhat.com>

	* configure.tgt: Remove i370-mvs architecture, it is not currently
	supported.

2001-05-25  H.J. Lu  <hjl@gnu.org>

	* emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
	like emulparams/aixppc.sh.

2001-05-25  H.J. Lu  <hjl@gnu.org>

	* emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
	setting of output_filename after bfd_scan_arch.
	* emultempl/pe.em: Likewise.

2001-05-25  H.J. Lu  <hjl@gnu.org>

	* emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
	like emulparams/aixppc.sh.

	* emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
	instead of ${srcdir}/emultempl/stringify.sed.

2001-05-25  Timothy Wall  <twall@oculustech.com>

	* emulparams/elf64_aix.sh: Change settings to match IBM linker
	output.

2001-05-25  Alan Modra  <amodra@one.net.au>

	* configure.host: Replace linuxoldld with linux*oldld.
	* configure.tgt: Likewise.

2001-05-24  H.J. Lu  <hjl@gnu.org>

	* emultempl/stringify.sed: Removed again.

2001-05-24  H.J. Lu  <hjl@gnu.org>

	* emultempl/aix.em (OUTPUT_ARCH): Defined.
	(gld${EMULATION_NAME}_before_parse): Initialize
	ldfile_output_architecture, ldfile_output_machine and
	ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
	* emultempl/beos.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/mipsecoff.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/sunos.em: Likewise.

2001-05-24 Tom Rix <trix@redhat.com>

	* emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
	udate import file format.
	(change_symbol_mode) New, same
	(is_syscall) New, same
	* emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
	* emulparams/aixppc64.sh : same
	* emulparams/aixrs6.sh : same
	* emulparams/ppcmacos.sh : same
	* emultempl/aix.em : use strtoull to parse options
	* Makefile.am : add eaixppc64 emulation for xcoff64
	* Makefile.in : same
	* configure.tgt : same

	* scripttempl/aix.sc : default text section offset to 0x10000000
	default data section offset to 0x20000000
	add .sv3264 and .sv64 pseudo sections
	loader and debug sections use the currect section offset.

	* emultempl/aix.em : Add xcoff64 support
	Add -binitfini support
	(gld${EMULATION_NAME}_before_parse) -binitfini
	(gld${EMULATION_NAME}_parse_args) same
	(gld${EMULATION_NAME}_before_allocation) format change for special
	sections

	* emulparams/aixppc64.sh : New file for xcoff64 support

2001-05-23  Alexandre Oliva  <aoliva@redhat.com>

	* emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
	variable to avoid non-portable shell construct.

2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	* ldmain.c (get_emulation): Add -mips5 command line argument.

2001-05-22  Alexandre Oliva  <aoliva@redhat.com>

	* emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
	(ELF_INTERPRETER_NAME): Define it.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
	it.
	* configure.tgt (targ_emul, targ_extra_emuls)
	[i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
	as primary, elf_i386 as extra.
	* Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
	(eelf_i386_ldso.c): New rule.
	* Makefile.in: Rebuilt.

2001-05-22  Nick Clifton  <nickc@redhat.com>

	* lexsup.c (ld_options):  Allow -I to be an alias for
	--dynamic-linker.  This is for Solaris compatability.
	* ld.texinfo: Document that -I can be used.
	* ld.1: Regenerate.

2001-05-16  Alan Modra  <amodra@one.net.au>

	* ldlang.c (wild_doit): Use linker_has_input to reliably determine
	whether an input section is the first one assigned to an output
	section.
	Assorted formatting fixes.

2001-05-14  DJ Delorie  <dj@delorie.com>

	* Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
	* Makefile.in: Ditto.

2001-05-11  Jakub Jelinek  <jakub@redhat.com>

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
	.gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
	output sections.
	* emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.

2001-05-11  Jakub Jelinek  <jakub@redhat.com>

	* ldlang.c (lang_process): Call bfd_merge_sections.

2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	* ldgram.y: Fix typo.

2001-05-03  H.J. Lu  <hjl@gnu.org>

	* emultempl/elf32.em: Include "libiberty.h".
	(gld${EMULATION_NAME}_vercheck): Call basename () to get the
	basename of the bfd filename.
	(gld${EMULATION_NAME}_stat_needed): Likewise.
	(gld${EMULATION_NAME}_try_needed): Likewise.
	(gld${EMULATION_NAME}_open_dynamic_archive): Likewise.

2001-05-02  H.J. Lu  <hjl@gnu.org>

	* emultempl/pe.em: Include <ctype.h>.

2001-05-02  Johan Rydberg  <jrydberg@opencores.org>

	* emulparams/elf32openrisc.sh: New file.

	* Makefile.am: Add OpenRISC target.
	* Makefile.in: Regenerated.

	* configure.tgt: Add openrisc-*-* mapping.

2001-05-02  Nick Clifton  <nickc@redhat.com>

	* emultempl/aix.em: Replace buystring with xstrdup.
	* emultempl/beos.em: Replace buystring with xstrdup.

2001-05-02  H.J. Lu  <hjl@gnu.org>

	* ldfile.c: Include "libiberty.h".
	* ldlex.l: Likewise.

	* ldmisc.c (buystring): Removed.
	* ldmisc.h: Likewise.

	* ldfile.c: Replace buystring with xstrdup.
	* ldlang.c: Likewise.
	* ldlex.l: Likewise.
	* ldmain.c: Likewise.
	* ldmisc.c: Likewise.
	* lexsup.c: Likewise.
	* mpw-eppcmac.c: Likewise.

2001-04-30  Andreas Jaeger  <aj@suse.de>

	* emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.

2001-04-28  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>

	* ldlang.c (load_symbols): Give emulation a chance
	to process unrecognized file before fatal error is
	reported, not after.

2001-04-27  Sean McNeil <sean@mcneil.com>

	* configure.tgt: Add arm-vxworks target.
	* scripttempl/armcoff.sc: Support .text or .data as a section name
	prefix.
	Define _etext.

2001-04-13  J.T. Conklin  <jtc@redback.com>

	* ld.texinfo: Document --fatal-warnings.
	* ld.1: Regenerate.

	* ldmisc.c (vfinfo): Set flag to inhibit making executable if
	warnings have been turned into errors.
	* lexsup.c (OPTION_WARN_FATAL): Define.
	(ld_options): Entry for --fatal-warnings.
	(parse_args): Handle OPTION_WARN_FATAL.
	* ld.h (ld_config_type): Add fatal_warnings field.

2001-04-13  Jakub Jelinek  <jakub@redhat.com>

	* ldmain.c (main): Default to discard_sec_merge.
	* lexsup.c (OPTION_DISCARD_NONE): Define.
	(ld_options): Add --discard-none.
	(parse_args): Handle OPTION_DISCARD_NONE.
	* ldlang.c (wild_doit): SEC_MERGE should be set in the output
	section only if SEC_MERGE and SEC_STRINGS flags and entsize of
	all its input sections match.

2001-04-05  Steven J. Hill  <sjhill@cotw.com>

	* Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
	(ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
	(eelf32ltsmip.c): New target.
	(eelf64btsmip.c): Likewise.
	(eelf64ltsmip.c): Likewise.
	* Makefile.in: Regenerated.

	* configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
	target.
	(mips*-*-linux-gnu*): Likewise.

	* emulparams/elf32ltsmip.sh: New. Traditional little endian
	MIPS taget.
	* emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
	target.
	* emulparams/elf64ltsmip.sh: New. Traditional 64bit little
	endian target.

2001-04-05  Hans-Peter Nilsson  <hp@axis.com>

	* emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
	correct value of __Stext here.
	(TEXT_START_SYMBOLS): Define; always define __Stext, to start of
	.startup section.

	* emulparams/crislinux.sh: Remove FIXME.

2001-04-02  Alan Modra  <alan@linuxcare.com.au>

	* emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
	(TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.

2001-03-27  Hans-Peter Nilsson  <hp@axis.com>

	* configure.tgt (cris-*-*): Change default emulation to criself.
	(cris-*-*aout*): New rule.

2001-03-27  Matthew Wilcox  <willy@ldl.fc.hp.com>

	* emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
	(TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.

2001-03-26  Andreas Jaeger  <aj@suse.de>

	* ld.texinfo (Overview): Fix syntax in texi code.

2001-03-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* ld.texinfo: Put @c man indications to generate the ld man page.
	When generating man, define all the variables.  Define SEEALSO
	and SYNOPSIS.  Re-organize some lines to avoid the cross references.
	* Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
	(ld.1): Generate from ld.texinfo.
	* Makefile.in: Regenerate.

2001-03-23  Mark Elbrecht <snowball3@bigfoot.com>

	* scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
	and '-fdata-sections'. Set the VMA of STABS sections to zero.

2001-03-17  Ulrich Drepper  <drepper@redhat.com>

	* emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
	is an absolute path look only for this file and not along the path.

2001-03-17  Ulrich Drepper  <drepper@redhat.com>

	* emultempl/elf32.em (OPTION_GROUP): New macro.
	Add new option Bgroup to longopts.
	(gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
	(gld*_list_options): Add -Bgroup and -z defs.
	* ld.1: Document -Bgroup and -z defs.
	* ld.texinfo: Likewise.

2001-03-07  Michael Meissner  <meissner@redhat.com>

	* scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
	with sections created by -fdata-sections.
	(.dynbss,.bss): Ditto.

2001-03-05  Alan Modra  <alan@linuxcare.com.au>

	* emultempl/m68kelf.em (m68k_elf_after_allocation): Call
	after_allocation_default, not gld..._before_allocation.

2001-02-27  Alan Modra  <alan@linuxcare.com.au>

	* configure.in (BFD_VERSION): New.
	(AM_INIT_AUTOMAKE): Use $BFD_VERSION.
	* configure: Regenerate.
	* Makefile.am: Run "make dep-am"
	* Makefile.in: Regenerate.

2001-02-26  Timothy Wall  <twall@cygnus.com>

	* emulparams/elf64_aix.sh: Add additional read-only sections;
	uncomment lines which are now required.

2001-02-26  H.J. Lu  <hjl@gnu.org>

	* ldlang.c (open_input_bfds): Set the bfd error handler so
	that problems can be caught whilst loading symbols.
	(record_bfd_errors): New function: Report BFD errors and mark
	the executable output as being invalid.

2001-02-22  Timothy Wall  <twall@cygnus.com>

	* configure.host: Add configuration for ia64-*-aix*.
	* Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
	Add dependencies for eelf64_aix.c.
	* Makefile.in: Regenerate.
	* configure.tgt: Add ia64-*-aix* mapping.
	* emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
	* testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
	AIX-specific test.

2001-02-20  H.J. Lu  <hjl@gnu.org>

	* ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
	false if we found the file.

2001-02-18  David O'Brien  <obrien@FreeBSD.org>

	* configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
	FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.

2001-02-18  lars brinkhoff  <lars@nocrew.org>

	* Makefile.am: Add PDP-11 target.
	* configure.tgt: Likewise.
	* emulparams/pdp11.sh: New file.

2001-02-17  David O'Brien  <obrien@FreeBSD.org>

	* configure.host: Add a generic FreeBSD configuration entry such that
	all [modern] FreeBSD systems on all platforms will look the same.

2001-02-14  H.J. Lu  <hjl@gnu.org>

	* configure.tgt: Remove mention of earmelf_linux26.

2001-02-13  Richard Henderson  <rth@redhat.com>

	* emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.

2001-02-13  H.J. Lu  <hjl@gnu.org>

	* ldexp.h (node_type): Add etree_provided.
	* ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
	type to etree_provided if defined by PROVIDE. Allow updating
	for etree_provided.
	(exp_print_tree): Handle etree_provided.
	* mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
	etree_provided.

2001-02-09  David Mosberger  <davidm@hpl.hp.com>

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
	.IA_64.unwind.* pattern to unwind table section and
	.IA_64.unwind_info* pattern to unwind info section.

2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* Makefile.am: Add linux target for S/390.
	* Makefile.in: Likewise.
	* configure.host: Likewise.
	* configure.tgt: Likewise.
	* emulparams/elf64_s390.sh: New file.
	* emulparams/elf_s390.sh: New file.

2001-02-09  Jakub Jelinek  <jakub@redhat.com>

	* configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
	targ_extra_libpath.
	(sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.

2001-02-06  Philip Blundell  <philb@gnu.org>

	* Makefile.am: Remove mention of earmelf_linux26.
	* Makefile.in: Regenerate.

2001-02-04  Philip Blundell  <philb@gnu.org>

	* emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
	* emulparams/armelf_linux26.sh: Delete.
	* configure.tgt: Remove mention of armelf_linux26 emulation.

2001-02-01  Nick Clifton  <nickc@redhat.com>

	* ld.1: Replace occurances of -oformat with --oformat.

2001-01-25  Jim Driftmyer <jdrift@stny.rr.com>

	* ldlang.c (lang_leave_overlay): Don't set lma_region when
	load_base is specified.

2001-01-24  Hans-Peter Nilsson  <hp@axis.com>

	* emultempl/elf32.em: Correct spelling in comments and listed
	options.

2001-01-23  Alan Modra  <alan@linuxcare.com.au>

	* ldlang.c (lang_leave_overlay): Only set lma_region from the
	default for the first section of a group of overlay sections.

2001-01-22  Alan Modra  <alan@linuxcare.com.au>

	* Makefile.am (GENSCRIPTS): Pass exec_prefix.
	* Makefile.in: Regenerate.
	* genscripts.sh: Use exec_prefix parameter to specify tool lib.
	Check for null tool_dir.

2001-01-16  Jim Wilson  <wilson@redhat.com>

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
	and IA_64.unwind.info.

2001-01-16  H.J. Lu  <hjl@gnu.org>

	* ldlang.c (lang_check): Merge the private data only if the
	input file has contents.

2001-01-14  Alan Modra  <alan@linuxcare.com.au>

	* emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.

	* emultempl/hppaelf.em (hppaelf_after_parse): New function,