delete old glibc

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1790 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-01-02 10:26:58 +00:00
parent 54bed3df15
commit d7abb4f193
125 changed files with 0 additions and 11377 deletions

View File

@ -1,128 +0,0 @@
AUX 2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 RMD160 f1162b7f313f7ea18fb178157d3bd6205d818e3a SHA1 d1dceb79689e9c627ebd630389ec1948d7a0a6e4 SHA256 0bc07eb47578d5bfb98774b18bf07aee2af44a7ccd947602c223b34e0d88394a
AUX 2.3.1/glibc-2.3.1-fpu-cw-mips.patch 433 RMD160 4eda3122052714ea216ab402ea5a3a7f4654f48e SHA1 afb44c9a12e3d4ee28c61dd62522244c09776da4 SHA256 8e68949febc8b14941d15b9afd914b158db11d282d19c528f75a0b58c379dcce
AUX 2.3.1/glibc-2.3.1-libc_wait-compat.patch 1053 RMD160 429e2065d45c4c68aa5f39eacf6d8ae5fbda63c8 SHA1 001a4af11de2029bcbb01a0afc4051cb4119807a SHA256 db4c92f86d3404ba4cc2f4d28e17517ed09124efcb518394d9c1df27d8540962
AUX 2.3.1/glibc-2.3.1-libgcc-compat-mips.patch 5222 RMD160 96fff2e999e03dded0624205ece4ede76fce103d SHA1 f745f534032e44e927b56c39523a9996ab3c3670 SHA256 bae5b0e114e78e6c5bfc4f0f1d22b6eb18eb2dbf61f973a3b70a199fe3732872
AUX 2.3.1/glibc-2.3.1-librt-mips.patch 396 RMD160 98e5d050cc4ffb81177bb75211bddee51577e15c SHA1 751b2fb92bd2d622ce1a2bcd22639f6ebdbe66b8 SHA256 34602422eaeff7aa6f237e1b5d6510c3bc0a6dfa7ed98db3a98a77ed602474a2
AUX 2.3.1/glibc-2.3.1-stack_end-compat.patch 751 RMD160 44bab511adb3c1280e394d46eeaa481156527279 SHA1 6e45a7080903670a845091227ff0f1faedcf833e SHA256 75bbe459830bc15ba7a4a11369d425e96ddfbde20a74566272e0ccefe2336021
AUX 2.3.1/glibc23-07-hppa-atomicity.dpatch 2519 RMD160 0cb103e3d870ae0c2c19ad412e586abb07a0fb83 SHA1 ef282b4b2625675498694529c11235fc672fe155 SHA256 4d82ab616cdfc617bd0a1aa0e58577c1dfa098c842cd44e3d464ade9c685fe6b
AUX 2.3.2/glibc-2.3.2-alpha-crti.patch 378 RMD160 cbf3783316c54696fa6f06cfe80a127a703081e8 SHA1 d1302f16b58141c6fabe36b013559c33b1526934 SHA256 41b6ea3f2916cbfa13e53f5638f79de3f841f78237113949c77999c689a4c2bc
AUX 2.3.2/glibc-2.3.2-alpha-pwrite.patch 918 RMD160 215e52ac558c1dc0755378241f18378f5399f5ce SHA1 9704ddb18411838c7800bebea33b45a8c2b9a842 SHA256 465cf1778398cf8ccb2d890060b81d2aa0ad12bbdc488c850304b8ea06646cf2
AUX 2.3.2/glibc-2.3.2-alpha-sysdeps.patch 939 RMD160 e374abb899168a146cbb6e314d5b4cb0a026e8c1 SHA1 54aaad0a92fce9886cd4de2ae4498943c9f93f41 SHA256 9550d9c7302e3b36cd58a355961534a0bed359a760a95b3cdd32aa1365783047
AUX 2.3.2/glibc-2.3.2-amd64-nomultilib.patch 506 RMD160 66039aba71e565b42c6a11fb1b4fe84f57608c6d SHA1 a46e9c2f989d75687bd3ad0dbee7f9e9315fb44e SHA256 11d597671ca97e12025889e50e67a8164b3b690bfa8c62fb0a577a60cf7f8bc3
AUX 2.3.2/glibc-2.3.2-arm-bus-defines.patch 276 RMD160 5b59f475a1b4b7552bae2a9f36a31f964796b105 SHA1 40d672db6cb73973bd136420f406c7227b06f9b9 SHA256 a229585089f00361627a7073780a33a3e00a4e1cd6531bea70365383312b46ea
AUX 2.3.2/glibc-2.3.2-armformat.patch 416 RMD160 16c89ed087a2dc63c5e34b7f43093d26af5bce5e SHA1 be5f32787f7f34b4b5d0f2e8e0077c5c18d3ca3d SHA256 9cc953a60de08b4c8493a1319d251c29681ac161098abd55cde3620ec8490595
AUX 2.3.2/glibc-2.3.2-assert.patch 1596 RMD160 bd09cff097118e9c3822a29e3c4c6bd3dc604658 SHA1 c945b7004e5d57f418103dcfab75d3f4c9d58708 SHA256 d89c1a8b7cc7a502c6e059c039a41e9da294958eaa9242e6b96f1e56203c8a28
AUX 2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch 2424 RMD160 0ef2658017b182a78c8f10e8209afe4a34354556 SHA1 3e15261dcff48cadb5f281523bea44753a8639f5 SHA256 3bf1d4d59fadf21ef3e034d0ad40e8408061fa1637af9008df1bec9485b7c805
AUX 2.3.2/glibc-2.3.2-decc-compaq.patch 1422 RMD160 29f46fc5dba4f8b7b8638e73193a88e893b730cd SHA1 9d1dda111ac5680247b695aeeb1f4297e7da7eeb SHA256 7f6834ec4ba96d7ddd07d758361373506cd064b6b6d88342057a6845fe62ac72
AUX 2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch 1405 RMD160 8469c60cf082525619bfeeadeedd41287c8348a2 SHA1 0a5653e665c64b14c6c2709fd2de56eee5add4df SHA256 6d9bb28882b1a574494ab1da5ee74aa7be004a55a4663a03971fdd6d1aeb65fc
AUX 2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch 1945 RMD160 99a52e18df5ff6eb4733509f12636baa2194c0b5 SHA1 2144ac7a126596f2d4d6be8af16a3b989c0815dd SHA256 6d1ecc01d018ff78f3b59a7fc68ee1eb29f55793003c6e47ee96b103d18de486
AUX 2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch 680 RMD160 9b122e59fccca53a447ee1d7126ad1bfc731f0b3 SHA1 763dfdb288cff424d7feb0fb8899378362a3dc27 SHA256 deae90efe1892b8e69f2ee88586cc4b134405cbe42ae0590bb2bc53afca034f5
AUX 2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch 440 RMD160 3c963846f8dadad6376043819ac7d8e07e221f43 SHA1 411f2d6980775a368b7cda850041fa84aa9954c6 SHA256 7d7090fc4a62aa97e2a61661f02fb06bf581a0c49dc9cb6d3199c462ec6eff80
AUX 2.3.2/glibc-2.3.2-frandom-detect.patch 1770 RMD160 58794c72a6257a4cebc66f7ae5e910451c22e3fa SHA1 07660c642ba1af9462b7d3f58ed77141c6f1e007 SHA256 c8eaf1e3e8c56e9d5189da18b5604bb8e92b646d3a0ee614da904ab75cc81a25
AUX 2.3.2/glibc-2.3.2-gcc33-sscanf.patch 671 RMD160 953876f55be0eda6789afe6ef48d9a2f51b7fbf2 SHA1 7f9ab3721147ea5e03698f2e1732469e6c034f94 SHA256 ec44d5302063203b09455af8d704a0280f8956abbd3f0956415f27904d34bff3
AUX 2.3.2/glibc-2.3.2-got-fix.diff 752 RMD160 addd458c45c4a781563a92e67f2b806de8f051b9 SHA1 229db39b5e5eb58971f809ae8ea75c320538b93b SHA256 f4abc4d6d12afb15bff78aefdf95d19633a1977b1651f9dcc675197e8a5c03df
AUX 2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch 4445 RMD160 97f4f3b012a137525e35c6bf927ab4136866acb1 SHA1 17ea521bb91e337485d36ac5d439bd0be791da2e SHA256 4393c4c37ba88dfa2cfcf149df6ce231d46412048f9d4c106fb9ef1b26507700
AUX 2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch 2262 RMD160 73a12aaf43f064002d2d04dc4410b6bafffc214c SHA1 83d6a14bb8c3475bcc5a64e7fa206a786fdc2d7b SHA256 7a051f53bf632ee2f2686dcf01c39e07013e8f273a60bdd41bdc9aabd5f2f555
AUX 2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch 4088 RMD160 f0e4a8fbc3ec5e5740f2003d1afdb3fd53c1e7f4 SHA1 6e991958cefb70b94722f51f4dd9faf037524548 SHA256 8d7c3cec4d5247cc07f5054c70bd0430c6d29a18419bb301fcc9019a9fa370d5
AUX 2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch 6344 RMD160 f2b87f81b46c965fbb1b2aa369805fe2a74617f2 SHA1 69f9d0e785a520e0264194eeaeb7b40007c0d835 SHA256 51920083d34e36d60f275fa1cba2cf6fec2457b2cadace8d873edadab5a2d81e
AUX 2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch 741 RMD160 02c73f356c0b13e8f95c664556c46e76c072545c SHA1 1b2c4ee140f704ed0857b940461e7b44591c9ef7 SHA256 6ba3f58d3ffb3feda338555144cc253a0517827c8d0476f623da409cea225e6c
AUX 2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch 4398 RMD160 3c480d14054fe3c9aefec8a29ada460f34cb709d SHA1 0f0217a60d38224046c04b727ed7e73012d61d67 SHA256 5ad8fa08003e6745ea0dfb9406d6cb22c789512b81c9fe262df1adf4a01ac23d
AUX 2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch 612 RMD160 9eaa7d6b257a8c198e240495db32542de37ac9ab SHA1 b97c841a50f013213cbd13abff6def3091c01e70 SHA256 5b58552b5cbbe2d9171f55590df31e110a61dfffd9c659c724e9106de57aa327
AUX 2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch 5310 RMD160 43e97ec565eabdec535e45dc79338cb8e101ca71 SHA1 46a46b143c723dd47c13c0db3a5df904c1463b5c SHA256 506d256a7531bc3729a396d05846b4bfecc7a24f2930e64ca317fded66c3bc19
AUX 2.3.2/glibc-2.3.2-nptl-fix-include.patch 247 RMD160 52fed74abfb434ee3077afa3ed836c784462a429 SHA1 f751cec5449f347cc6d9ef9d1af9c7a926535170 SHA256 fad574563c3c714cc31c50237b90be423531318ccada0d02cb5cbdda64b8bcd2
AUX 2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff 1425 RMD160 354715c62330b52d917b8af226fe4111f2764817 SHA1 25d5b6763893c1c383664c7332a27701efaf7fbf SHA256 4832ae591e07c028996911e486205ddca9323ab0967f5a197c63150456b640d5
AUX 2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch 5107 RMD160 1b90c60b37301619e2e570de93b4f65bb4ceeffd SHA1 11cf6dc40b1b3c72680130fd7ade8427a9cb3f6e SHA256 48a37c8415359dbc3423d79b8e404cd8a4b327ef6a3d18cb86cae68df1a32764
AUX 2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 RMD160 bc170f598926964188d1a3c00fbd97bfcd07bf6a SHA1 549afaf6b879836b949e57d668de9c3f7d60bfcd SHA256 aeb4ccfce4283951d3bbdd4ec582d6901416fbaceb9fc899795758937007618c
AUX 2.3.2/glibc-2.3.2-propolice-guard-functions.patch 5069 RMD160 ee713cf1a15f80462799736fa20a40438b75a270 SHA1 de85375938a394bc06cd09f3c1e877a19fedc26b SHA256 d233ffde002735447e9a440716036a66ba305026edc3f9b512b4609ec8c58695
AUX 2.3.2/glibc-2.3.2-pt_pax.diff 1470 RMD160 db0fc8e78f65e88886331aa0cbb7e7c5b2a51eca SHA1 c6d53462588c4c9a717a1dcc3665f7c1b1e2ce8f SHA256 8133d90ef77d54b3dc2711bec836881da5081d724c192cdb7dc1ac8cfbd66115
AUX 2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch 2532 RMD160 81b4ffe919e9dad5111f87421a6f6345d2de42c8 SHA1 20dd6a17ba46e5ff0dbc31474f66d7fe221dea12 SHA256 14c04633d168ae4bf3d440719898b10adf8b09517004f2b62d1a7f8665dc1ace
AUX 2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch 1077 RMD160 44e4c6249321d7d0776600a5a356d3b0f0c5e746 SHA1 40ce5d282f1fa3ace73da06f9627f5ffff7ee6df SHA256 90c66ab0ec9afe72b377762ab399bc840970ead67ced8402100083bcadac5696
AUX 2.3.2/glibc-2.3.2-rtld-assert-fix.patch 1153 RMD160 8b2b8fd03c26e61c6a07d8f6b7cee911b75f130e SHA1 d0fc4838c748a2e6bcebbcb8e5a4b925bfb9429f SHA256 12ca6b529a7da9f3dd1076a8b8e8ac89b51bc34d49123966ca9e23361a6239e9
AUX 2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch 6638 RMD160 ca1ee40cd6552ea85182678a226e86b4a9332c58 SHA1 f61049b99b1d2df54931094ef6fa2e5edae92b6d SHA256 26f4664cf67b70cb5c4675f0c9e03feae3a5c49d6992c5d6abbd8f66495b334d
AUX 2.3.2/glibc-2.3.2-signal-ssp.diff 1431 RMD160 fa128a533a0b2faf0395b5fa99898d669755aae9 SHA1 31935dccd26221642681ee43a5c2d152fc7b9af9 SHA256 e6c4f3f5bf458b79cb6f51ff56d49b188e6c2bc6d0b6c09294f4054bbdb05598
AUX 2.3.2/posix_fadvise64.c 2752 RMD160 9e478c37513997fdf7fad5578805d27335e97eb1 SHA1 6c8e5d8fb23e079e0d50153f4cf592190a63c158 SHA256 a67e1672df99b8955c80fd2ac46992e972a7552ea58126261e0f2660c8dd9b78
AUX 2.3.2/ssp.c 3935 RMD160 48acf2f8607b750e56745836af7fdebbfa603aa7 SHA1 2e5fe75a8119f2669c9782ce11cfa9068c0c79cb SHA256 7c0db663bc8f55d27cbcab117731dc7b72a33b1a25fbc00e36bc273e31a42b9d
AUX 2.3.2/sysmacros.h 2443 RMD160 53418fd7a312fee1a131be935dc8a2359b4dd84d SHA1 3cdfa1ad2a5e77b9d56800289c6073750c5635b8 SHA256 bcf0f0ee379f08f63e3f9c5804ab6346af39b89a80009823d46bf3fcf6c2955b
AUX 2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 RMD160 bc170f598926964188d1a3c00fbd97bfcd07bf6a SHA1 549afaf6b879836b949e57d668de9c3f7d60bfcd SHA256 aeb4ccfce4283951d3bbdd4ec582d6901416fbaceb9fc899795758937007618c
AUX 2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch 1791 RMD160 5181360f36dc34acbf4dcb701cf36daa93b0e554 SHA1 3868a78c27f26a5503ef5ef9a4b7652a6de1417e SHA256 f713681ec83c4aa359911fb2c8c1d813233647168b34b16db14efd49e98a123d
AUX 2.3.3/glibc-2.3.3-frandom-detect.patch 1770 RMD160 58794c72a6257a4cebc66f7ae5e910451c22e3fa SHA1 07660c642ba1af9462b7d3f58ed77141c6f1e007 SHA256 c8eaf1e3e8c56e9d5189da18b5604bb8e92b646d3a0ee614da904ab75cc81a25
AUX 2.3.3/glibc-2.3.3-localedef-fix-trampoline.patch 2329 RMD160 de6ba25b8330e6ee720355e8541235d265a461cd SHA1 cf869cbd74793cb579b42d734884f10d4cadcdde SHA256 b5cf51d1ff5479d09fbc82992f126ca4969006c90c3a2ae94ad586d4902d791b
AUX 2.3.3/glibc-2.3.3-mips-addabi.diff 1720 RMD160 c099261c359635046121718ade146d76a9410fa9 SHA1 493f17eaa26082a992654ea874f9bb01c2cab0d2 SHA256 6536add1d26ceee20f59245eeea372ceb19beecfe1fa559738f0fbd8457671ef
AUX 2.3.3/glibc-2.3.3-mips-nolib3264.diff 1166 RMD160 8a9db675ad7e6e08f29e62b41756d4e3525d3121 SHA1 ad735ee79c37c65c405812c1d23ad17fa65db3c4 SHA256 ad932aecfb8031b0f721576bb7f76473fed91a05892bd5dc91d77dd5d77a90a9
AUX 2.3.3/glibc-2.3.3-mips-semtimedop.diff 602 RMD160 ccd60a0996c37599c761bda8b421135da45e1336 SHA1 0f965ca6bdec14fb664d82179807ea9ac1dbb6dd SHA256 4822fda370fe74b9f6af402869236ad55e47ad26a4efed7bf39f244dc9da92b1
AUX 2.3.3/glibc-2.3.3-mips-syscall.h.diff 1199 RMD160 2b41b0c5eda1d8c01d1053538c0a43ac102f75d4 SHA1 34d4c05e2f826f1cde268e4f2375ea6d92969aa7 SHA256 223d7c37dc342577b88281385087ec01f35ea506cbc2b4768033c686b8f16686
AUX 2.3.3/glibc-2.3.3-mips-sysify.diff 2138 RMD160 205aa658400c4d1b1403f1dc0b79c5216b42f8e1 SHA1 03e9099ecdc86e313139211b8cefeacd553a6e77 SHA256 638768e4f5a56bbc9bbe39b0cd17e54a3aab78d58d2682048b709f871f029731
AUX 2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff 1425 RMD160 354715c62330b52d917b8af226fe4111f2764817 SHA1 25d5b6763893c1c383664c7332a27701efaf7fbf SHA256 4832ae591e07c028996911e486205ddca9323ab0967f5a197c63150456b640d5
AUX 2.3.3/glibc-2.3.3-tempfile.patch 1787 RMD160 7009918fb18ec7bf138d0c67fe7b0c149a5e76fe SHA1 bd6fe6a7198ea9d94449d4313ce6ba9470af506f SHA256 6e8245494f8cb4623f0911bc24b192748d0f2763a7935970621a38f72f6b3a9c
AUX 2.3.3/glibc-2.3.3_pre20040117-got-fix.diff 752 RMD160 addd458c45c4a781563a92e67f2b806de8f051b9 SHA1 229db39b5e5eb58971f809ae8ea75c320538b93b SHA256 f4abc4d6d12afb15bff78aefdf95d19633a1977b1651f9dcc675197e8a5c03df
AUX 2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff 1470 RMD160 db0fc8e78f65e88886331aa0cbb7e7c5b2a51eca SHA1 c6d53462588c4c9a717a1dcc3665f7c1b1e2ce8f SHA256 8133d90ef77d54b3dc2711bec836881da5081d724c192cdb7dc1ac8cfbd66115
AUX 2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff 1431 RMD160 fa128a533a0b2faf0395b5fa99898d669755aae9 SHA1 31935dccd26221642681ee43a5c2d152fc7b9af9 SHA256 e6c4f3f5bf458b79cb6f51ff56d49b188e6c2bc6d0b6c09294f4054bbdb05598
AUX 2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff 1497 RMD160 a84bc7c082643984ba61183548e34e9609ce602c SHA1 f5933d7e3339e51d42a8fea009f3c6826e1ddd01 SHA256 9d8078970c78f5b007bc0ee5dfdaf476d3700a54a0c718eb5e4537f3ab4db355
AUX 2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff 8287 RMD160 4638ea91406c9078d485cf7fc2c667250080338d SHA1 6f90285c9acac1a84e97e82c445675c44c3ee7db SHA256 d0155031d68a2d12ff958f78b442c73f0bcc017684d693b6749bc442d766c754
AUX 2.3.3/ssp.c 4041 RMD160 7044685a01288ce54e06640f1f927db73c7d8280 SHA1 ba35ef21708ba7d67b33118b79371d907a0dc41c SHA256 398e397e4b2dde42ad85a740bf272a8d03cfdc675960de6405f5bd268a1311af
AUX 2.3.4/glibc-2.3.3-mdns-resolver2.diff 12272 RMD160 d91f14f75a3ca86396242870dd2a5f5112a61bfc SHA1 2dc4ac0463aaba55a3d2842e33af739383853056 SHA256 186446593831bb62b92879d7dc6fda6ffff0fb53f3618b30cbeb5cba1558a08d
AUX 2.3.4/glibc-2.3.4-arm-ioperm.patch 4037 RMD160 cd3831205bc59ecc1a47744164d16e280d3c1c93 SHA1 654682fbc865a2fc117d4763e124d3b3b955f06c SHA256 9146fd6eed255545501dce4c898d3c1a7bc158b5ae091e82f895245baef032dd
AUX 2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch 1443 RMD160 f0027946dcd8da3a1bcd47ce872b20ee060e7d79 SHA1 e603c312908381a942151e8f367b96548040fbbe SHA256 8dad8afec4a9815d41466a01daf8af38c753eab8a8ed1ede61f86ca6b84ee8fc
AUX 2.3.4/glibc-2.3.4-features-header-fix.patch 449 RMD160 622ee88546240628283dfafd2eb3694423b17a21 SHA1 1f0416dec77a4ee1dd4d80623054604dc3d1b91c SHA256 e3b634d450e7f6ad6aa2df221f3d28b3f4a58c7c2b29c4d2f331828c23dcadf1
AUX 2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch 2337 RMD160 ade2e03e847f0b526764f8980f60484632182a9a SHA1 4ab729ee4200499a58909d60982078f1ec28c5ca SHA256 c1e36f67cf3f0123d6fd0c0ac4e80cc6fad9c5bcbd68e4148d8d1fc5347395d8
AUX 2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch 2288 RMD160 bbc1498498eb5c4b321e9b9af2f49646271836a1 SHA1 7b85a4972ff4cbe2daddde20adb1afd9981c319f SHA256 6c6bbc17e9d5faa86d9ade82dcd07c2513d2c260537327b4ddf1030b3d5292de
AUX 2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch 372 RMD160 5ffee93ba7acbc4ca9f5a76df1e99b322a89573f SHA1 3705d199f32872aea693344fac9097d0557a63b9 SHA256 9e6b3462c1c3fe0037485a7b894d80c6da4349fedc73586395c5032e8c60abd2
AUX 2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch 9140 RMD160 9d4a3fe184adeed5a8886efc110f46b4bc2f1464 SHA1 c5b351327fb7c5c6946de604ecb73a5240e8328c SHA256 285fca201ac16f3c7c1fe131d6f4f437bd8b5fb65c3f2720ab29704bd087e56f
AUX 2.3.4/glibc-2.3.4-getcontext.patch 9854 RMD160 e7059e73595771bece8bded5074da749ffa5b0f9 SHA1 2789bdf10d3786f6462701f4dd0f94f891b95d70 SHA256 521dff9f4c3c81f88710abab72809bcac63f4c17bbc6c1ce9edac4757c124b7a
AUX 2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch 382 RMD160 c89d75606c14aaba32a13b307fd6f8d1e6bc8f6c SHA1 5bf11155da5f7d13d6d27523f35282076b6b3318 SHA256 580dc1a3967586541e78b7e1a5acba95834086c2fd790d766bff2138482b1820
AUX 2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch 2310 RMD160 f000d2a35e5b852d9058c3a5f6a6302bda4134cf SHA1 74a85379871c98c13daf5acc784b1faf80c9c350 SHA256 1a7fa31a9efbdc742993b8ee46c14356659f29221127664dc08316d197d41e21
AUX 2.3.4/glibc-2.3.4-ld.so-brk-fix.patch 2562 RMD160 fe646cc4527f5b608b0bacec8a61ea497405d156 SHA1 8a929a9e8d97a8757117575360bd5d220ec44e4a SHA256 29803fc15fc9214d7b536b9511c2413a1e7a09aafd70f523830f92fc4a2322c1
AUX 2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff 12809 RMD160 fabb6c145302f0cc66a18dbc02f70473cafcb59f SHA1 6e4a45d80c1c6ff8997975e81b6968650353848e SHA256 5c2b82b11e96f8535d3bcfb2c6cf791b7ccf1a52a17597642e83911564adc749
AUX 2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch 1196 RMD160 77acb28f5d63aa99dcad89e3174db9959213b201 SHA1 5481c6f108bda250afe1a2f44ce90c910074a318 SHA256 a5b19098aa74fa3830e8f783861ba293cb5b6b1655110578e6f2f6d2ef3b0ca8
AUX 2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch 8230 RMD160 bc10c04abb729811cadc663a14aed507672b1a31 SHA1 fc6ed283e15c95b8f7a95f1fb0ff0b15bcbf33a4 SHA256 00551e655acfa2d0748894cb56ef37d605adb18f412bfb9339eb5caab9555efe
AUX 2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch 1410 RMD160 9ff69a319b6ec0b30c23ae27b40419fbb5aa61ec SHA1 487953182d9c642a1c50280aa4720c839da7bf60 SHA256 94d260e531eb057f714a852ae14a2d5b5af607010e697b65f4077b98f7b487c9
AUX 2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch 1425 RMD160 73ea789e48b0b0bbb67b2081b90d1ecf14ecdf81 SHA1 795062c851ebb4901445e4aa4fbdb0f971ee2bd0 SHA256 245b8b95d62a763a8111efba76bad2b749660c3a183088a81efd196ea5527c86
AUX 2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff 2402 RMD160 fc09a94a9f71eadb42e29620a285a4e78365bee9 SHA1 8f096a8b491f2523b7726b50d85f80371534e732 SHA256 14b507752480c2cbe2fc2caae0b358dfb3e8d568da979827ad56b54caacf2034
AUX 2.3.4/glibc-2.3.4-mips-update-__throw.patch 1975 RMD160 bf96df13049983368abd5f60030ff0882f9f88fe SHA1 047e24610e66644dc97f7ba67dd4cc8b0f6333f4 SHA256 d0e6ac3dc3a59a55854553481e1ddf22025b1d91c0f1da10b87ef428da88f309
AUX 2.3.4/glibc-2.3.4-nptl-altivec.patch 6140 RMD160 9d7257cfea2d3cb5ac91229c5f555db506707834 SHA1 6dd72f844d02fbed530828c8101e5c33e2946304 SHA256 aaf78f5378303443e1aaefb11db4bd312d91801753d66b9ade080611f1237e1b
AUX 2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch 3304 RMD160 bde103e605dd953baabab03b5aa31320462e2e3c SHA1 ede6ebddfd1bd748a20cd151b3174e976dcae6db SHA256 71efa50989d3c68c855ae6c8e0f686ba2d2b3418486da9924f3f365dd3783ea7
AUX 2.3.4/glibc-2.3.4-res_init.patch 3417 RMD160 ed66680ef9bbdc9a1aaf22c7237778fb865f2a62 SHA1 9550b6ce63603fb689ccc3e4b2f5f0293cc7403c SHA256 928c7291094d59800823344a34c6aab6b25f921b53db64e8fe95bbc68e5b4c68
AUX 2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff 4203 RMD160 ffbf96d9d471ce6582c6e32db4a87446ba67d33e SHA1 cb3e4670de182b526ac4934fdc1f69961e73a8a4 SHA256 e634c0d04d6896650a62db2d5985b3728b32f406d907f022ef0ee642252b3e64
AUX 2.3.4/glibc-gentoo-libdir.patch 1347 RMD160 7ca1a159d74a615246d2e1b45e0911ac463daa21 SHA1 1c62821482722c606426b2dbc286bd798debbc28 SHA256 f8e5729b904b7592897bfa11bc268d65c5689bdef83b74c572fbb1fbee2f826c
AUX 2.3.4/glibc-sec-hotfix-20040916.patch 3080 RMD160 3419ab628d16045042f5df9e487386e03c8d979d SHA1 b69cfa5115746f2d38fa301a55d68efe88f7bcff SHA256 9f48a55f4207bdf4a9496680f09661a06d4a4bd11dad11cb0986949c0d3cc35d
AUX 2.3.4/glibc234-alpha-xstat.patch 7653 RMD160 6264e9a9c7ff7a95120994985113fce0bd7b5f43 SHA1 c23097a40527399fd26128e7336ed00571a9d5d1 SHA256 541ac8a6532f7fd5a30b5c65451fe7122b4d04a3dd4dc85601216d6d185c3d70
AUX 2.3.4/host.conf 1302 RMD160 84c89e4c5934b024a4a14c0e0d876600493cc7c8 SHA1 35aa49ce270c694bd1856e124dd294eff50cc5aa SHA256 83ede694aa7f4cd79b0c64592f0ef9d338ba1fed4b02f26ee1534372d19c0c7f
AUX 2.3.4/hppa-no-pie.patch 1265 RMD160 a7b0b172f5d5269c980747c7fee0e5341306a402 SHA1 c90936a5f1fea9d925556e9f12e119d373bb11fc SHA256 c7c01f35eed933b63ed25061d617e414aeb0826ad100d78e5cd9b1e56461273b
AUX 2.3.5/glibc-2.3.5-frandom-detect.patch 3080 RMD160 7d0824edc14f9bfdde07eb7d1ac0d0281e55e343 SHA1 d62af2e590920d8fb07a977ce3f2d5bf3a62c064 SHA256 910a95fe5cf46402fcf865c5d759002e4a54ec979e3a70147f5ac8620e01f3f1
AUX 2.3.5/glibc-2.3.5-propolice-guard-functions.patch 8243 RMD160 7c9a503c63c9aacb391cd4d2965ef15ea9d93a5e SHA1 0c1996cf9283a0c42f70dfa5a62711d2a6c13b81 SHA256 b66912489b53eebbc21db2a85f72468e3be142c9bcd2686044b68131b83d1bcc
AUX 2.3.5/ssp.c 4297 RMD160 cbedfaed1440e23c076dd8a883ea3c707623d61c SHA1 0700fe3a6a91d1c8fe08daf4ef04fbfbcb9db5cd SHA256 77367f274b85926791741d6014f3b068b31cb9c8dbf056716c972eae7cf03237
AUX 2.3.6/glibc-2.3.6-propolice-guard-functions.patch 8273 RMD160 d062d48850928039562d0d2bb543e238f852dc75 SHA1 0f52d6bb75b5b1fe7322d28aa614d4397cb58e12 SHA256 34bb6a47b634bb19506f13b652ad24a9e8644369cdb7729d9ea32edcec969370
AUX 2.3.6/host.conf 937 RMD160 8e5e0f24d65fa744c3d182344808766609cb2619 SHA1 101c76b043b1b86a8a4695b02c17f5d44b294be8 SHA256 0d30aa973b76d6b2c1bc947046978bd0a6f61d7aaf495caf361d14d16a932348
AUX 2.4/glibc-gentoo-libdir.patch 991 RMD160 b68d1bb0fdbff82922905fff6a5d49301fa85c34 SHA1 9c65b4c3961b26b936ff244b5e0b2f9d9b7769b8 SHA256 2358695c5c0a1e324ebb9c4941fb043e07b5c98cca6ab0685e5412524f2b359c
AUX 2.4/ssp_simple.c 914 RMD160 d9510f3b13f2fad4e2386c64644b592ef18efc7f SHA1 07cb2e617dbce313760380541e99c6d0677c4afa SHA256 57d6a3d25b24f13758637bc0b15dd9d0305a4178a5fe55b0bb14a1d2e49fd7c8
AUX 2.5/glibc-2.5-gentoo-stack_chk_fail.c 9058 RMD160 c98d7007857aeeea00e708e7989800dad9b07ae3 SHA1 ff92b7b6cb4a364dbe81c5110da79d1ad56a72ba SHA256 067fba2a36d2630d50198c44395ef208cdf080508f1b716bd3d079f7b964e2df
AUX 2.5/glibc-2.5-hardened-configure-picdefault.patch 794 RMD160 7ab81bac4b9625043b1e7edea6fb5707696c144d SHA1 25a0b018eb44f3c9818876a12e9ec817e305d80b SHA256 0c0359f567e4ad2d3184618bf6ac7e6102b703eab6227c7e9a4ff4dcdeed2c91
AUX 2.5/glibc-2.5-hardened-inittls-nosysenter.patch 9407 RMD160 352112bf4f2d8d58471f22f623784350baf0bc86 SHA1 ae244e9923c0a0e8be4121d593897530c0bf08e8 SHA256 2a912e82445815ae32744d990c59d8758ec74e482b856bd274c292848b9af1fd
AUX 2.5/glibc-2.5-hardened-pie.patch 1569 RMD160 8746aeb9f9c68ca153d93cf92c9df93d0fb324d6 SHA1 c2ec8d9286af38017f5bee5a8823f642c067201d SHA256 ff9cde8857c5da89faa4039e2a81748674fbeaaa49d85c378d80711d55f2b0c1
AUX 2.6/glibc-2.6-gentoo-stack_chk_fail.c 9545 RMD160 9a21c9deb6ebca5d2245e3bb50b53ce035967a5f SHA1 11ad52117fa55bbe51b429043df49767c7f58de0 SHA256 1410ded812be80d452eada5f9d6b9bd7bdb504c14f01cc27dce3e36b6f92b92a
AUX 2.6/glibc-2.6-hardened-inittls-nosysenter.patch 8674 RMD160 f4e7df0cb25292afc13e18332569d2ca288fdf92 SHA1 7f34ef26d6607321e0ec5ad0f389cb1aedf5e0da SHA256 cf58ded8fbe9fcb3dc094521feec2588c1520ff2c632b20c69d6a210325c4fcf
AUX 2.7/glibc-2.7-hardened-inittls-nosysenter.patch 8755 RMD160 b674894f3b16f63193bb8040f8a5657dce82e1f9 SHA1 79fb3a4454b85af70dac95dd79134be3fe3a9201 SHA256 b0b1bf0746f7160b89cf281502b95c38dec9cb948d6a50a907b84fd6230a2dc3
AUX eblits/common.eblit 8751 RMD160 7e0b5242366606725ef06e0a496638cafcdac676 SHA1 aa5976529ac4a22d8924fada9fc6e50f2792902f SHA256 f32fd4017acca5f0d9aca12025ee105822030058702507b740212e8434ee36b7
AUX eblits/pkg_postinst.eblit 1159 RMD160 4b99846819bf0471d1104a8a17dd260796644f9d SHA1 4a2980fede3edebc7960d40db7cf935c7c854859 SHA256 76c403cf5c77a3a3bb7441566335f0c8da2584eaa21f05ab400e7bb00f9db810
AUX eblits/pkg_preinst.eblit 3285 RMD160 990d7ee7cfa1ba79a19bc6c01c05817ebfc0ee96 SHA1 3ee2fe58fa7ca246311cf5ef23fa1ccbe509cf49 SHA256 8bc7dea37213048787ce0bec61e9abe8adabb547b5385024bf2549d0a036239c
AUX eblits/pkg_setup.eblit 2814 RMD160 8352c4b9cc460b7193e17be8bca227db5b6df5ba SHA1 8de7ea78e364521b55574b16036d57e7d35a596f SHA256 b803723f75571649e10e0707a6dbe8b459eabdc149ef155558792db736faa201
AUX eblits/src_compile.eblit 5799 RMD160 d67f00fb2af47136c309b03a1242d9f1f6da3e48 SHA1 5ce394af1f7f0e6871916836dcdd871817d6b05a SHA256 9cfb28aa5acf017d878b95767c401f2949a6c3fae42f91aa1d89af68a56efc2a
AUX eblits/src_install-2.6.eblit 7946 RMD160 6cc258a316b78212777ab328a3c0cb73de1616d4 SHA1 94895689b56fd712156e8ac84a2a639d8475da03 SHA256 54081c34217c230d0ff43c5df378897a37576e727fe41ee4d681767110667f3e
AUX eblits/src_install.eblit 7893 RMD160 789a4518bbb0be8a028f331e2673e423d2717a93 SHA1 7288c1bcc7f05e8aa0d4f90d4c63be128a2d225d SHA256 d5f0cb0345c33f66a90d73e7e0264867d9bcf4a137190d6ae4008d63a3b7bd56
AUX eblits/src_test.eblit 1162 RMD160 349db09c5f2c2e412a108b8c5371adf946e1a3f0 SHA1 357ef650e1dce62d5d688133426bc62b9085009d SHA256 bac1db2da478f6e6709275c36cc1f9a98fac7fcc2e80bd8831f2077207754962
AUX eblits/src_unpack.eblit 5134 RMD160 fba35312f25e908fa225a7803d0b194e83579d6a SHA1 e6abd0516994a86ca6836872f5acc39c4d2a866d SHA256 1edd30423009f220d98ae39e2d708fd053edfff302bfd9012b8cc4e6d81eca45
AUX fix-sysctl_h.patch 376 RMD160 b5dd68158224b09ddc42986be02351c74f81e0a0 SHA1 5601fbea6961368bcc192aef78e96ee2c5310713 SHA256 3a589f63fd1f3f6c5a00c66a10943d3d64630aefb1eb5b37e7f2a856fcea234a
AUX glibc-2.2.2-test-lfs-timeout.patch 320 RMD160 c8baab8326b4aebf642dd5ab512fbebf2371e9d9 SHA1 df2a868fba86adba184ae9750e9dee3b2ec300a5 SHA256 28e7ebc92ed93a12daf5357f07537be3daed5f4717a075c77a3ad248ec99dcf0
AUX glibc-sec-hotfix-20040804.patch 4319 RMD160 6f7f58794273ed0736653a09e823e8ac3031ed29 SHA1 1d86c62d5c52b59881eab006b36e3a9891607887 SHA256 9d950b2f45cfbdae6df590137e4aae938380673449fe4507536557fb4c797393
AUX glibc-sec-hotfix-20040916.patch 3080 RMD160 3419ab628d16045042f5df9e487386e03c8d979d SHA1 b69cfa5115746f2d38fa301a55d68efe88f7bcff SHA256 9f48a55f4207bdf4a9496680f09661a06d4a4bd11dad11cb0986949c0d3cc35d
AUX locales.build 699 RMD160 2a186105be5b00ec48aedef734e9dba5aee19895 SHA1 02ce7b63d60da7bb4b936969721f78486ffe9788 SHA256 094a5e02148d522be5a5ec2b95fb7305d5503f6d13d1ffa9088e9dad21af1c8a
AUX nscd 1621 RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 SHA1 5751fe798024c2021b7b3ed3e798618e2a38244a SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8
AUX nscd.conf 1158 RMD160 50651e89a0cb206b1d37dae8840527694fe561b5 SHA1 5f5166aa6e0bffa57c52c39d3ec51ad3b0efa607 SHA256 378b7953adf5aa0e03bff49b7c654cae67b3efee7c92361b385fe7d3e9fb57c7
AUX nsswitch.conf 503 RMD160 f375f92f6b41029c93382c39cef896261b140cfc SHA1 42f7f5cc3de75c69bf60d806ac8490106ea63326 SHA256 6c38b8642d5da884327ad678d0351d57be3621562253bd9711394bad87e45e2d
AUX test-__thread.c 53 RMD160 dcc9960f3bf26c935f41dc5c408613963885ad58 SHA1 dcb60595b2730a8a05eb045563f13cd615830acf SHA256 28a7836b810cf21f6071126d6b19dbdbf567f2544f9283700d125ad653d7519e
AUX test-sysctl_h.c 54 RMD160 b7c2e5956e0a232193610701ccc57a8d56615a36 SHA1 d727fbe809fbec9157661fbdb6c8077a68d95044 SHA256 19337cae62f1ebc23ca8d8de8a98e7f03c9dd77a671100995d6e7c8a3833e759
DIST glibc-2.10.1-patches-2.tar.bz2 93298 RMD160 23165ef6f61547829531b60e4b628ba927961dcb SHA1 c505e101bda46249fc912a4af8b625f10ea96d79 SHA256 7fac7c333744ea9793918f90d54f1ff6ac996340312c3f56e0eaf7bf2e3ab5e8
DIST glibc-2.10.1.tar.bz2 16106243 RMD160 ca102519ab32714e788a0db5dd43c2f9962c86e9 SHA1 cb478cf9d6e2c905a1a4f4a2cae44a320b8dc50b SHA256 cbad3e637eab613184405a87a2bf08a41991a0e512a3ced60d120effc73de667
DIST glibc-libidn-2.10.1.tar.bz2 102248 RMD160 0fbb3ecc09f59f0b9e90e0669bd9cd6075164173 SHA1 50c1ac0d9ddff6eb83f75aa1c4cb84ba6fffa0cd SHA256 0fa72d1dd06a30642d3bb20a659f4ed0f4af54a205d7102896b68169b38676dc
DIST glibc-ports-2.10.1.tar.bz2 584860 RMD160 1f094d4df18306ccb01037d07f0a0e3014fdfc60 SHA1 3cc9eff22d624c5fb6d951bbcb31b40112238fe7 SHA256 b1f1ec9720036a3a33598b8478eef102535444a083d5b5813a6981ed74ab4071
EBUILD glibc-2.10.1.ebuild 7677 RMD160 dc1d977272bd72437d7cda23ac5be522a332b2af SHA1 b160b117ad7fa0e9c090d2b01731bf0c59e67bf5 SHA256 75d8ffab31d41f5d4914da1f0955eb5c22b4fdb7803c5285b4835f9ae65cb435

View File

@ -1,66 +0,0 @@
--- glibc-2.3.1/ctype/ctype-info.c.orig 2002-11-07 15:58:39.000000000 +0200
+++ glibc-2.3.1/ctype/ctype-info.c 2002-11-07 16:01:24.000000000 +0200
@@ -48,6 +48,7 @@
#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
+#if 0
const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
@@ -61,5 +62,23 @@
compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
+#endif
#endif
+
+/* Temporarily exported until all .a libraries are recompiled. */
+#undef b
+#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
+
+extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
+extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
+
+const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
+const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
+const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
+const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
+const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
+const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
+
--- glibc-2.3.1/locale/lc-ctype.c.orig 2002-12-30 11:43:39.000000000 +0200
+++ glibc-2.3.1/locale/lc-ctype.c 2002-12-30 11:48:22.000000000 +0200
@@ -75,6 +75,7 @@
We need those relocations so that a versioned definition with a COPY
reloc in an executable will override the libc.so definition. */
+#if 0
compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
@@ -89,4 +90,21 @@
__ctype32_toupper = current (uint32_t, TOUPPER32, 0);
__ctype32_tolower = current (uint32_t, TOLOWER32, 0);
#endif
+
+#endif
+
+ /* Temporary. */
+ extern __const unsigned short int *__ctype_b; /* Characteristics. */
+ extern __const __int32_t *__ctype_tolower; /* Case conversions. */
+ extern __const __int32_t *__ctype_toupper; /* Case conversions. */
+ extern const uint32_t *__ctype32_b;
+ extern const uint32_t *__ctype32_toupper;
+ extern const uint32_t *__ctype32_tolower;
+
+ __ctype_b = current (uint16_t, CLASS, 128);
+ __ctype_toupper = current (uint32_t, TOUPPER, 128);
+ __ctype_tolower = current (uint32_t, TOLOWER, 128);
+ __ctype32_b = current (uint32_t, CLASS32, 0);
+ __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
+ __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
}

View File

@ -1,12 +0,0 @@
diff -u -r1.6 fpu_control.h
--- libc/sysdeps/mips/fpu_control.h 6 Jul 2001 04:56:00 -0000 1.6
+++ libc/sysdeps/mips/fpu_control.h 19 Oct 2002 16:03:35 -0000
@@ -74,7 +74,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
/* The fdlibm code requires strict IEEE double precision arithmetic,

View File

@ -1,32 +0,0 @@
--- glibc-20020408/posix/Versions.bak 2002-02-04 12:42:40.000000000 +0100
+++ glibc-20020408/posix/Versions 2002-04-19 01:01:00.000000000 +0200
@@ -3,6 +3,9 @@
# functions with special/multiple interfaces
__bsd_getpgrp; __setpgid; __getpgid;
+ # This will be GLIBC_PRIVATE, just give Sun JDK some time to catch up
+ __libc_wait; __libc_waitpid;
+
# functions with required interface outside normal name space
_exit;
@@ -83,6 +86,9 @@
GLIBC_2.1.2 {
# functions used in other libraries
__vfork;
+
+ # This will be GLIBC_PRIVATE, just give wine some time to catch up
+ __libc_fork;
}
GLIBC_2.2 {
# p*
@@ -109,6 +115,7 @@
GLIBC_PRIVATE {
# functions which have an additional interface since they are
# are cancelable.
- __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep; __libc_fork;
+ # __libc_wait; __libc_waitpid;
+ __libc_pause; __libc_nanosleep; # __libc_fork;
__libc_pread; __libc_pread64; __libc_pwrite; __libc_pwrite64;
__waitid; __pselect;
}

View File

@ -1,173 +0,0 @@
# DP: Description: libgcc-compat symbols for mips
# DP: Author: Guido Guenther
# DP: thanks to Jack Howarth for explanations and help
# DP: Upstream status: Not submitted
# DP: Date: 2002-10-13, updated 2002-10-20
--- libc/sysdeps/mips/Makefile.orig Sun Oct 13 14:45:56 2002
+++ libc/sysdeps/mips/Makefile Sun Oct 13 14:51:20 2002
@@ -6,3 +6,15 @@
ifeq ($(subdir),setjmp)
sysdep_routines += setjmp_aux
endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+ifeq (yes,$(have-protected))
+CPPFLAGS-divdi3.c = -DHAVE_DOT_HIDDEN
+CPPFLAGS-libgcc-compat.c = -DHAVE_DOT_HIDDEN
+endif
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
--- libc/sysdeps/mips/Dist.orig Sun Oct 13 15:07:31 2002
+++ libc/sysdeps/mips/Dist Sun Oct 13 15:07:41 2002
@@ -1,3 +1,5 @@
+divdi3.c
+libgcc-compat.c
setjmp_aux.c
regdef.h
sgidefs.h
--- /dev/null Sat Mar 16 18:32:44 2002
+++ libc/sysdeps/mips/divdi3.c Sun Oct 13 14:44:34 2002
@@ -0,0 +1,43 @@
+/* 64-bit multiplication and division libgcc routines for 32-bit mips
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define _DIVDI3_C
+#include <sysdeps/wordsize-32/divdi3.c>
+
+INTDEF (__udivdi3);
+INTDEF (__moddi3);
+INTDEF (__umoddi3);
+
+#ifdef HAVE_DOT_HIDDEN
+asm (".hidden __divdi3");
+asm (".hidden __udivdi3");
+asm (".hidden __moddi3");
+asm (".hidden __umoddi3");
+#endif
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.0);
+symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.0);
+symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.0);
+symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.0);
+
+#endif
--- /dev/null Sat Mar 16 18:32:44 2002
+++ libc/sysdeps/mips/libgcc-compat.c Sun Oct 20 17:11:59 2002
@@ -0,0 +1,81 @@
+/* pre-.hidden libgcc compatibility
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+ return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+ return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixdfdi (double);
+int64_t __fixdfdi_internal (double d)
+{
+ return __fixdfdi (d);
+}
+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
+
+
+extern int64_t __fixsfdi (float);
+int64_t __fixsfdi_internal (float d)
+{
+ return __fixsfdi (d);
+}
+symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
+
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+ return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+ return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+
+floatdisf (int64_t);
+float __floatdisf_internal (int64_t u)
+{
+ return __floatdisf (u);
+}
+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
+
+#endif
--- /dev/null Sat Mar 16 18:32:44 2002
+++ libc/sysdeps/mips/Versions Sun Oct 20 17:12:00 2002
@@ -0,0 +1,8 @@
+libc {
+ GLIBC_2.0 {
+ # Functions from libgcc.
+ __cmpdi2; __ucmpdi2;
+ __divdi3; __moddi3; __udivdi3; __umoddi3;
+ __fixdfdi; __fixsfdi; __fixunsdfdi; __floatdidf; __floatdisf;
+ }
+}

View File

@ -1,15 +0,0 @@
# DP: add clock_{get,set}time@@GLIBC_2.0
# DP: although it should actually be @@GLIBC_2.2
--- libc/sysdeps/unix/sysv/linux/mips/Versions.orig Tue Sep 24 15:56:55 2002
+++ libc/sysdeps/unix/sysv/linux/mips/Versions Tue Sep 24 15:49:27 2002
@@ -34,3 +34,9 @@
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
}
+librt {
+ GLIBC_2.0 {
+ # c*
+ clock_gettime; clock_settime;
+ }
+}

View File

@ -1,22 +0,0 @@
--- glibc-2.3.1/elf/Versions.orig 2002-11-07 17:04:54.000000000 +0200
+++ glibc-2.3.1/elf/Versions 2002-11-07 17:06:56.000000000 +0200
@@ -32,6 +32,10 @@
_r_debug;
}
GLIBC_2.1 {
+ # This will be GLIBC_PRIVATE, just to give folks some time
+ # to fix their stuff
+ __libc_stack_end;
+
# functions used in other libraries
_dl_mcount;
}
@@ -41,7 +45,7 @@
}
GLIBC_PRIVATE {
# Those are in the dynamic linker, but used by libc.so.
- __libc_enable_secure; __libc_stack_end;
+ __libc_enable_secure; # __libc_stack_end;
_dl_argv; _dl_catch_error; _dl_check_map_versions;
_dl_debug_printf; _dl_debug_state; _dl_dst_count;
_dl_dst_substitute; _dl_init; _dl_lookup_symbol; _dl_lookup_symbol_skip;

View File

@ -1,81 +0,0 @@
#! /bin/sh -e
# DP: Description: atomicity.h placeholder for HPPA
# DP: Author: Carlos O'Donell <carlos@baldric.uwo.ca>
# DP: Upstream status: Not submitted upstream
# DP: Status Details: --
# DP: Date: November 16, 2002
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
diff -urN glibc-2.3.1.orig/sysdeps/hppa/atomicity.h glibc-2.3.1/sysdeps/hppa/atomicity.h
--- glibc-2.3.1.orig/sysdeps/hppa/atomicity.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.3.1/sysdeps/hppa/atomicity.h 2002-11-07 08:35:55.000000000 -0500
@@ -0,0 +1,55 @@
+/* Low-level functions for atomic operations. HP-PARISC version.
+ Copyright (C) 1997,2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H 1
+
+#include <inttypes.h>
+
+#warning stub atomicity functions are not atomic
+#warning CAO This will get implemented soon
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ int result = *mem;
+ *mem += val;
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ *mem += val;
+}
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ if (*p != oldval)
+ return 0;
+
+ *p = newval;
+ return 1;
+}
+
+#endif /* atomicity.h */

View File

@ -1,10 +0,0 @@
--- glibc-2.3.2/linuxthreads/sysdeps/alpha/elf/pt-initfini.c.old 2003-11-01 17:55:51.000000000 -0500
+++ glibc-2.3.2/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2003-11-01 20:17:04.000000000 -0500
@@ -75,7 +75,6 @@
subq $30, 16, $30 \n\
stq $26, 0($30) \n\
stq $29, 8($30) \n\
- .prologue 1 \n\
.align 3 \n\
/*@_fini_PROLOG_ENDS*/ \n\
\n\

View File

@ -1,13 +0,0 @@
--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/syscalls.list.old 2003-11-01 19:21:19.000000000 -0500
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/syscalls.list 2003-11-01 19:21:25.000000000 -0500
@@ -22,8 +22,8 @@
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise
-pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs i:sp __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64

View File

@ -1,24 +0,0 @@
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2003/06/20 16:24:36 1.16
+++ libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2004/03/23 23:31:47 1.17
@@ -65,6 +65,16 @@
# define __NR_semtimedop 423
#endif
+/* This is a kludge to make syscalls.list find these under the names
+ pread and pwrite, since some kernel headers define those names
+ and some define the *64 names for the same system calls. */
+#if !defined __NR_pread && defined __NR_pread64
+# define __NR_pread __NR_pread64
+#endif
+#if !defined __NR_pwrite && defined __NR_pwrite64
+# define __NR_pwrite __NR_pwrite64
+#endif
+
/*
* In order to get the hidden arguments for rt_sigaction set up
* properly, we need to call the assembly version. This shouldn't

View File

@ -1,11 +0,0 @@
--- sysdeps/unix/sysv/linux/configure.orig 2003-06-28 01:51:12.000000000 +0000
+++ sysdeps/unix/sysv/linux/configure 2003-06-28 01:51:23.000000000 +0000
@@ -224,7 +224,7 @@
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
+ sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
mips/mips64/n64/* )
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then

View File

@ -1,11 +0,0 @@
--- sysdeps/unix/sysv/linux/arm/ioperm.c.orig Tue Apr 27 00:30:01 2004
+++ sysdeps/unix/sysv/linux/arm/ioperm.c Tue Apr 27 00:29:57 2004
@@ -41,6 +41,8 @@
#include <string.h>
#include <unistd.h>
+#include <linux/input.h>
+
#include <sys/types.h>
#include <sys/mman.h>

View File

@ -1,11 +0,0 @@
--- glibc-2.3.2-200304020432/scripts/output-format.sed.armformat 2003-07-19 09:47:39.000000000 -0400
+++ glibc-2.3.2-200304020432/scripts/output-format.sed 2003-07-19 09:48:00.000000000 -0400
@@ -5,7 +5,7 @@
}
t o
: o
-s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
+s/^.*OUTPUT_FORMAT(\([^,]*\), .*, \1).*$/OUTPUT_FORMAT(\1)/
t q
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\2,\3/
t s

View File

@ -1,44 +0,0 @@
Index: assert/assert.h
===================================================================
RCS file: /cvs/glibc/libc/assert/assert.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- assert/assert.h 15 Aug 2003 17:54:31 -0000 1.25
+++ assert/assert.h 4 Oct 2004 07:45:23 -0000 1.26
@@ -84,33 +84,16 @@
__END_DECLS
-/* For the macro definition we use gcc's __builtin_expect if possible
- to generate good code for the non-error case. gcc 3.0 is a good
- enough estimate for when the feature became available. */
-# if __GNUC_PREREQ (3, 0)
-# define assert(expr) \
- (__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 : \
- (__assert_fail (__STRING(expr), __FILE__, __LINE__, \
- __ASSERT_FUNCTION), 0)))
-# else
-# define assert(expr) \
+# define assert(expr) \
(__ASSERT_VOID_CAST ((expr) ? 0 : \
(__assert_fail (__STRING(expr), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
-# endif
# ifdef __USE_GNU
-# if __GNUC_PREREQ (3, 0)
-# define assert_perror(errnum) \
- (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 : \
- (__assert_perror_fail ((errnum), __FILE__, __LINE__, \
- __ASSERT_FUNCTION), 0)))
-# else
-# define assert_perror(errnum) \
+# define assert_perror(errnum) \
(__ASSERT_VOID_CAST (!(errnum) ? 0 : \
(__assert_perror_fail ((errnum), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
-# endif
# endif
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'

View File

@ -1,67 +0,0 @@
--- glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c.orig Sat Sep 6 05:52:52 2003
+++ glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c Wed Sep 10 21:50:15 2003
@@ -66,8 +66,9 @@
__set_errno (EINVAL);
return -1;
}
-
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
termios_p->c_ospeed = speed;
+#endif
termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
termios_p->c_cflag |= speed;
@@ -91,8 +92,9 @@
__set_errno (EINVAL);
return -1;
}
-
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
termios_p->c_ispeed = speed;
+#endif
if (speed == 0)
termios_p->c_iflag |= IBAUD0;
else
diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c
--- glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 12:41:08.000000000 -0400
+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 11:56:37.000000000 -0400
@@ -45,16 +45,20 @@
termios_p->c_cflag = k_termios.c_cflag;
termios_p->c_lflag = k_termios.c_lflag;
termios_p->c_line = k_termios.c_line;
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
#ifdef _HAVE_C_ISPEED
termios_p->c_ispeed = k_termios.c_ispeed;
#else
termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
#endif
+#endif
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
#ifdef _HAVE_C_OSPEED
termios_p->c_ospeed = k_termios.c_ospeed;
#else
termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
#endif
+#endif
if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
|| (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c
--- glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 12:41:08.000000000 -0400
+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 11:56:42.000000000 -0400
@@ -71,12 +71,16 @@
k_termios.c_cflag = termios_p->c_cflag;
k_termios.c_lflag = termios_p->c_lflag;
k_termios.c_line = termios_p->c_line;
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
#ifdef _HAVE_C_ISPEED
k_termios.c_ispeed = termios_p->c_ispeed;
#endif
+#endif
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
#ifdef _HAVE_C_OSPEED
k_termios.c_ospeed = termios_p->c_ospeed;
#endif
+#endif
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
__KERNEL_NCCS * sizeof (cc_t));

View File

@ -1,28 +0,0 @@
diff -ruN glibc-2.3.2.orig/include/features.h glibc-2.3.2/include/features.h
--- glibc-2.3.2.orig/include/features.h 2003-06-14 00:28:23.000000000 +0100
+++ glibc-2.3.2/include/features.h 2003-06-14 00:58:57.000000000 +0100
@@ -285,7 +285,8 @@
#if defined __GNUC__ \
|| (defined __PGI && defined __i386__ ) \
|| (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \
+ && !(defined(__DECC) || defined(__DECCXX))
# define __GLIBC_HAVE_LONG_LONG 1
#endif
diff -ruN glibc-2.3.2.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h glibc-2.3.2/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
--- glibc-2.3.2.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-06-14 00:28:24.000000000 +0100
+++ glibc-2.3.2/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-06-14 00:57:16.000000000 +0100
@@ -64,9 +64,11 @@
{
struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
_pthread_descr __c_waiting; /* Threads waiting on this condition */
+#if !(defined(__DECC) || defined(__DECCXX)) /* hide this from DEC CC/CXX */
char __padding[48 - sizeof (struct _pthread_fastlock)
- sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
__pthread_cond_align_t __align;
+#endif /* __DECC */
} pthread_cond_t;

View File

@ -1,44 +0,0 @@
===================================================================
RCS file: /cvs/glibc/libc/elf/dl-reloc.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- libc/elf/dl-reloc.c 2003/01/30 17:36:11 1.82
+++ libc/elf/dl-reloc.c 2003/03/01 22:31:52 1.83
@@ -44,23 +44,31 @@
static void __attribute_noinline__
allocate_static_tls (struct link_map *map)
{
- size_t offset = roundup (GL(dl_tls_static_used), map->l_tls_align);
- if (offset + map->l_tls_blocksize
+ size_t offset, used, check;
+
# if TLS_TCB_AT_TP
- + TLS_TCB_SIZE
+ offset = roundup (GL(dl_tls_static_used) + map->l_tls_blocksize,
+ map->l_tls_align);
+ used = offset;
+ check = offset + TLS_TCB_SIZE;
# elif TLS_DTV_AT_TP
+ offset = roundup (GL(dl_tls_static_used), map->l_tls_align);
+ used = offset + map->l_tls_blocksize;
+ check = used;
/* dl_tls_static_used includes the TCB at the beginning. */
# else
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
# endif
- > GL(dl_tls_static_size))
+
+ if (check > GL(dl_tls_static_size))
{
const char *errstring = N_("\
shared object cannot be dlopen()ed: static TLS memory too small");
INTUSE(_dl_signal_error) (0, (map)->l_name, NULL, errstring);
}
+
map->l_tls_offset = offset;
- GL(dl_tls_static_used) = offset + map->l_tls_blocksize;
+ GL(dl_tls_static_used) = used;
}
#endif

View File

@ -1,59 +0,0 @@
Index: sysdeps/unix/sysv/linux/dl-execstack.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/dl-execstack.c,v
retrieving revision 1.3
diff -u -p -r1.3 dl-execstack.c
--- sysdeps/unix/sysv/linux/dl-execstack.c 25 Sep 2003 23:04:12 -0000 1.3
+++ sysdeps/unix/sysv/linux/dl-execstack.c 8 Nov 2003 00:34:33 -0000
@@ -41,8 +41,11 @@ _dl_make_stack_executable (void)
if (__mprotect ((void *) page, GL(dl_pagesize),
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
return 0;
- if (errno != EINVAL)
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != EINVAL) {
return errno;
+ }
no_growsdown = true;
}
# endif
@@ -64,8 +67,11 @@ _dl_make_stack_executable (void)
page -= size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GL(dl_pagesize))
/* We just tried to mprotect the top hole page and failed.
@@ -92,8 +98,11 @@ _dl_make_stack_executable (void)
if (__mprotect ((void *) page, GL(dl_pagesize),
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
return 0;
- if (errno != EINVAL)
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != EINVAL) {
return errno;
+ }
no_growsup = true;
}
# endif
@@ -114,8 +123,11 @@ _dl_make_stack_executable (void)
page += size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GL(dl_pagesize))
/* We just tried to mprotect the lowest hole page and failed.

View File

@ -1,17 +0,0 @@
2000-05-22 Jakub Jelinek <jakub@redhat.com>
* sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Avoid using ?:
with omitted middle operand.
--- libc/sysdeps/i386/fpu/bits/mathinline.h 4 Jun 2003 22:17:35 -0000 1.1.1.13
+++ libc/sysdeps/i386/fpu/bits/mathinline.h 4 Jun 2003 22:22:36 -0000 1.11
@@ -381,7 +381,8 @@ __sincosl (long double __x, long double
("fscale # 2^int(x * log2(e))\n\t" \
: "=t" (__temp) : "0" (1.0), "u" (__exponent)); \
__temp -= 1.0; \
- return __temp + __value ?: __x
+ __temp += __value; \
+ return __temp ? __temp : __x
__inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code)

View File

@ -1,14 +0,0 @@
--- sysdeps/generic/framestate.c.orig Fri Apr 23 23:59:52 2004
+++ sysdeps/generic/framestate.c Sat Apr 24 00:00:13 2004
@@ -42,7 +42,11 @@
if (handle == NULL
|| (frame_state_for
= (framesf) __libc_dlsym (handle, "__frame_state_for")) == NULL)
+#ifndef __USING_SJLJ_EXCEPTIONS__
frame_state_for = fallback_frame_state_for;
+#else
+ frame_state_for = abort;
+#endif
}
return frame_state_for (pc, frame_state);

View File

@ -1,52 +0,0 @@
diff -Naur glibc-2.3.2-orig/config.h.in glibc-2.3.2/config.h.in
--- glibc-2.3.2-orig/config.h.in 2004-05-11 21:44:51.000000000 -0400
+++ glibc-2.3.2/config.h.in 2004-05-11 22:41:34.903935791 -0400
@@ -208,6 +208,9 @@
/* Defined of libidn is available. */
#undef HAVE_LIBIDN
+/* Defined if economical random device is available. */
+#undef HAVE_DEV_ERANDOM
+
/*
*/
diff -Naur glibc-2.3.2-orig/configure.in glibc-2.3.2/configure.in
--- glibc-2.3.2-orig/configure.in 2004-05-11 21:44:51.000000000 -0400
+++ glibc-2.3.2/configure.in 2004-05-11 22:32:57.999546229 -0400
@@ -289,6 +289,13 @@
[])
AC_SUBST(all_warnings)
+dnl See whether the user wants to disable checking for /dev/erandom
+AC_ARG_ENABLE([dev-erandom],
+ AC_HELP_STRING([--disable-dev-erandom],
+ [disable testing for /dev/erandom]),
+ [try_dev_erandom=$enableval],
+ [try_dev_erandom=yes])
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a
@@ -1911,6 +1918,21 @@
sizeof_long_double=$ac_cv_sizeof_long_double
AC_SUBST(sizeof_long_double)
+dnl check whether we have an economical random device
+if test "$try_dev_erandom" = yes ; then
+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
+ [if test -r "/dev/erandom" ; then
+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
+ if test "$ac_cv_have_dev_erandom" = yes; then
+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
+ [defined if the system supports an economical random device] )
+ fi
+else
+ AC_MSG_CHECKING(for economical random device)
+ ac_cv_have_dev_erandom=no
+ AC_MSG_RESULT(has been disabled)
+fi
+
### End of automated tests.
### Now run sysdeps configure fragments.

View File

@ -1,21 +0,0 @@
--- stdio-common/sscanf.c.~1.8.~ 2003-01-16 11:25:20.000000000 +0100
+++ stdio-common/sscanf.c 2003-03-05 12:07:34.000000000 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,95,96,98,2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,9 +27,7 @@
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
int
-sscanf (s, format)
- const char *s;
- const char *format;
+sscanf (const char *s, const char *format, ...)
{
va_list arg;
int done;

View File

@ -1,22 +0,0 @@
--- glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 18:14:37.000000000 +0100
+++ glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 23:32:16.000000000 +0100
@@ -73,16 +73,13 @@ _start:
addl $_GLOBAL_OFFSET_TABLE_, %ebx
/* Push address of our own entry points to .fini and .init. */
- leal __libc_csu_fini@GOTOFF(%ebx), %eax
- pushl %eax
- leal __libc_csu_init@GOTOFF(%ebx), %eax
- pushl %eax
+ pushl __libc_csu_fini@GOT(%ebx)
+ pushl __libc_csu_init@GOT(%ebx)
pushl %ecx /* Push second argument: argv. */
pushl %esi /* Push first argument: argc. */
- leal BP_SYM (main)@GOTOFF(%ebx), %eax
- pushl %eax
+ pushl BP_SYM (main)@GOT(%ebx)
/* Call the user's main function, and exit with its value.
But let the libc call main. */

View File

@ -1,96 +0,0 @@
From libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Sep 24 06:27:22 2003
Return-Path: <libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
Received: (qmail 23856 invoked by alias); 24 Sep 2003 06:27:20 -0000
Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
Precedence: bulk
List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
List-Post: <mailto:libc-alpha at sources dot redhat dot com>
List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
Sender: libc-alpha-owner at sources dot redhat dot com
Delivered-To: mailing list libc-alpha at sources dot redhat dot com
Received: (qmail 23847 invoked from network); 24 Sep 2003 06:27:16 -0000
Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55)
by sources dot redhat dot com with SMTP; 24 Sep 2003 06:27:16 -0000
Received: from lucon.org ([12.234.88.5])
by comcast dot net (sccrmhc11) with ESMTP
id <2003092406271601100ok1f3e>; Wed, 24 Sep 2003 06:27:16 +0000
Received: by lucon.org (Postfix, from userid 1000)
id 6B4D02C828; Tue, 23 Sep 2003 23:27:11 -0700 (PDT)
Date: Tue, 23 Sep 2003 23:27:11 -0700
From: "H dot J dot Lu" <hjl at lucon dot org>
To: Richard Henderson <rth at twiddle dot net>
Cc: GNU C Library <libc-alpha at sources dot redhat dot com>,
linux ia64 kernel <linux-ia64 at vger dot kernel dot org>
Subject: PATCH: Re: Inefficient ia64 system call implementation in glibc
Message-ID: <20030924062711.GA860@lucon.org>
References: <20030919163218.GA21480@lucon.org> <20030921210434.GA2280@twiddle.net> <20030922193918.GA1141@lucon.org> <20030922232123.GA17271@twiddle.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20030922232123 dot GA17271 at twiddle dot net>
User-Agent: Mutt/1.4.1i
On Mon, Sep 22, 2003 at 04:21:23PM -0700, Richard Henderson wrote:
> On Mon, Sep 22, 2003 at 12:39:18PM -0700, H. J. Lu wrote:
> > Can I get char * from char [300]?
>
> x+0 would work in this case; I'd guess it'd work for most of the
> cases that syscalls need to handle.
>
This patch works for me.
H.J.
---
2003-09-22 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_1): Use
__typeof ((outX) + 0) instead of long.
(LOAD_ARGS_2): Likewise.
(LOAD_ARGS_3): Likewise.
(LOAD_ARGS_4): Likewise.
(LOAD_ARGS_5): Likewise.
(LOAD_ARGS_6): Likewise.
--- sysdeps/unix/sysv/linux/ia64/sysdep.h.inline 2003-08-21 07:05:30.000000000 -0700
+++ sysdeps/unix/sysv/linux/ia64/sysdep.h 2003-09-23 11:04:02.000000000 -0700
@@ -191,23 +191,23 @@
#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#define LOAD_ARGS_0() do { } while (0)
-#define LOAD_ARGS_1(out0) \
- register long _out0 asm ("out0") = (long) (out0); \
+#define LOAD_ARGS_1(out0) \
+ register __typeof ((out0) + 0) _out0 asm ("out0") = (out0); \
LOAD_ARGS_0 ()
-#define LOAD_ARGS_2(out0, out1) \
- register long _out1 asm ("out1") = (long) (out1); \
+#define LOAD_ARGS_2(out0, out1) \
+ register __typeof ((out1) + 0) _out1 asm ("out1") = (out1); \
LOAD_ARGS_1 (out0)
-#define LOAD_ARGS_3(out0, out1, out2) \
- register long _out2 asm ("out2") = (long) (out2); \
+#define LOAD_ARGS_3(out0, out1, out2) \
+ register __typeof ((out2) + 0) _out2 asm ("out2") = (out2); \
LOAD_ARGS_2 (out0, out1)
-#define LOAD_ARGS_4(out0, out1, out2, out3) \
- register long _out3 asm ("out3") = (long) (out3); \
+#define LOAD_ARGS_4(out0, out1, out2, out3) \
+ register __typeof ((out3) + 0) _out3 asm ("out3") = (out3); \
LOAD_ARGS_3 (out0, out1, out2)
-#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
- register long _out4 asm ("out4") = (long) (out4); \
+#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
+ register __typeof ((out4) + 0) _out4 asm ("out4") = (out4); \
LOAD_ARGS_4 (out0, out1, out2, out3)
-#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
- register long _out5 asm ("out5") = (long) (out5); \
+#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
+ register __typeof ((out5) + 0) _out5 asm ("out5") = (out5); \
LOAD_ARGS_5 (out0, out1, out2, out3, out4)
#define ASM_OUTARGS_0

View File

@ -1,78 +0,0 @@
--- glibc-2.3.2-net/iconv/iconvconfig.c 12 Jun 2003 09:48:20 -0000 1.1.1.10
+++ glibc-2.3.2-redhat/iconv/iconvconfig.c 12 Jun 2003 09:55:36 -0000 1.14
@@ -988,6 +988,34 @@ next_prime (uint32_t seed)
module name offset
(following last entry with step count 0)
*/
+
+static struct hash_entry *hash_table;
+static size_t hash_size;
+
+/* Function to insert the names. */
+static void name_insert (const void *nodep, VISIT value, int level)
+{
+ struct name *name;
+ unsigned int idx;
+ unsigned int hval2;
+
+ if (value != leaf && value != postorder)
+ return;
+
+ name = *(struct name **) nodep;
+ idx = name->hashval % hash_size;
+ hval2 = 1 + name->hashval % (hash_size - 2);
+
+ while (hash_table[idx].string_offset != 0)
+ if ((idx += hval2) >= hash_size)
+ idx -= hash_size;
+
+ hash_table[idx].string_offset = strtaboffset (name->strent);
+
+ assert (name->module_idx != -1);
+ hash_table[idx].module_idx = name->module_idx;
+}
+
static int
write_output (void)
{
@@ -995,8 +1023,6 @@ write_output (void)
char *string_table;
size_t string_table_size;
struct gconvcache_header header;
- struct hash_entry *hash_table;
- size_t hash_size;
struct module_entry *module_table;
char *extra_table;
char *cur_extra_table;
@@ -1008,30 +1034,6 @@ write_output (void)
char tmpfname[prefix_len + sizeof (GCONV_MODULES_CACHE)
+ strlen (".XXXXXX")];
char finalname[prefix_len + sizeof (GCONV_MODULES_CACHE)];
-
- /* Function to insert the names. */
- static void name_insert (const void *nodep, VISIT value, int level)
- {
- struct name *name;
- unsigned int idx;
- unsigned int hval2;
-
- if (value != leaf && value != postorder)
- return;
-
- name = *(struct name **) nodep;
- idx = name->hashval % hash_size;
- hval2 = 1 + name->hashval % (hash_size - 2);
-
- while (hash_table[idx].string_offset != 0)
- if ((idx += hval2) >= hash_size)
- idx -= hash_size;
-
- hash_table[idx].string_offset = strtaboffset (name->strent);
-
- assert (name->module_idx != -1);
- hash_table[idx].module_idx = name->module_idx;
- }
/* Open the output file. */
assert (GCONV_MODULES_CACHE[0] == '/');

View File

@ -1,112 +0,0 @@
--- libc/resolv/nss_dns/dns-host.c 2003/10/26 08:33:27 1.38
+++ libc/resolv/nss_dns/dns-host.c 2004/01/15 09:45:57 1.39
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -298,6 +298,8 @@
return NSS_STATUS_UNAVAIL;
}
+ host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024);
+
switch (af)
{
case AF_INET:
@@ -305,29 +307,38 @@
(uaddr[2] & 0xff), (uaddr[1] & 0xff), (uaddr[0] & 0xff));
break;
case AF_INET6:
- /* XXX Maybe we need an option to select whether to use the nibble
- or the bitfield form. The RFC requires the bitfield form so
- we use it. */
+ /* Only lookup with the byte string format if the user wants it. */
+ if (__builtin_expect (_res.options & RES_USEBSTRING, 0))
+ {
+ qp = stpcpy (qbuf, "\\[x");
+ for (n = 0; n < IN6ADDRSZ; ++n)
+ qp += sprintf (qp, "%02hhx", uaddr[n]);
+ strcpy (qp, "].ip6.arpa");
+ n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR,
+ host_buffer.buf->buf, 1024, &host_buffer.ptr);
+ if (n >= 0)
+ goto got_it_already;
+ }
qp = qbuf;
- qp = stpcpy (qbuf, "\\[x");
- for (n = 0; n < IN6ADDRSZ; ++n)
- qp += sprintf (qp, "%02hhx", uaddr[n]);
- strcpy (qp, "].ip6.arpa");
+ for (n = IN6ADDRSZ - 1; n >= 0; n--)
+ {
+ static const char nibblechar[16] = "0123456789abcdef";
+ *qp++ = nibblechar[uaddr[n] & 0xf];
+ *qp++ = '.';
+ *qp++ = nibblechar[(uaddr[n] >> 4) & 0xf];
+ *qp++ = '.';
+ }
+ strcpy(qp, "ip6.arpa");
break;
default:
/* Cannot happen. */
break;
}
- host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024);
-
n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
1024, &host_buffer.ptr);
if (n < 0 && af == AF_INET6)
{
- qp = qbuf;
- for (n = IN6ADDRSZ - 1; n >= 0; n--)
- qp += sprintf (qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf);
strcpy (qp, "ip6.int");
n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
host_buffer.buf != orig_host_buffer
@@ -342,6 +353,7 @@
return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
}
+ got_it_already:
status = getanswer_r (host_buffer.buf, n, qbuf, T_PTR, result, buffer, buflen,
errnop, h_errnop, 0 /* XXX */);
if (host_buffer.buf != orig_host_buffer)
--- libc/resolv/resolv.h 2002/12/15 23:22:50 1.37
+++ libc/resolv/resolv.h 2004/01/15 09:41:58 1.38
@@ -199,6 +199,8 @@
#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
#define RES_BLAST 0x00020000 /* blast all recursive servers */
+#define RES_USEBSTRING 0x00040000 /* IPv6 reverse lookup with byte
+ strings */
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
--- libc/resolv/res_debug.c 2002/08/08 02:01:31 1.28
+++ libc/resolv/res_debug.c 2004/01/15 09:43:35 1.29
@@ -572,6 +572,10 @@
case RES_DNSRCH: return "dnsrch";
case RES_INSECURE1: return "insecure1";
case RES_INSECURE2: return "insecure2";
+ case RES_USE_INET6: return "inet6";
+ case RES_ROTATE: return "rotate";
+ case RES_NOCHECKNAME: return "no-check-names";
+ case RES_USEBSTRING: return "ip6-bytstring";
/* XXX nonreentrant */
default: sprintf(nbuf, "?0x%lx?", (u_long)option);
return (nbuf);
--- libc/resolv/res_init.c 2003/09/04 12:48:52 1.34
+++ libc/resolv/res_init.c 2004/01/15 09:44:18 1.35
@@ -489,6 +489,9 @@
#endif
} else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
statp->options |= RES_USE_INET6;
+ } else if (!strncmp(cp, "ip6-bytestring",
+ sizeof("ip6-bytestring") - 1)) {
+ statp->options |= RES_USEBSTRING;
} else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
statp->options |= RES_ROTATE;
} else if (!strncmp(cp, "no-check-names",

View File

@ -1,153 +0,0 @@
2003-09-10 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
Index: linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
--- /dev/null Wed Sep 10 15:45:19 2003
+++ linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h Wed Sep 10 15:45:14 2003
@@ -0,0 +1,145 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Demetriou of Broadcom Corporation,
+ based on work by Guido Guenther <agx@sigxcpu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+#include <sys/asm.h>
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+#ifdef __PIC__
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ 99: \
+ PTR_LA t9,__syscall_error; \
+ /* manual cpreturn. */ \
+ REG_L gp, STKOFF_GP(sp); \
+ RESTORESTK ; \
+ jr t9; \
+ ENTRY (name) \
+ SAVESTK ; \
+ .cpsetup t9, STKOFF_GP, name ; \
+ .set reorder; \
+ SINGLE_THREAD_P(t0); \
+ bne zero, t0, L(pseudo_cancel); \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ /* manual cpreturn. */ \
+ REG_L gp, STKOFF_GP(sp); \
+ RESTORESTK ; \
+ ret; \
+ L(pseudo_cancel): \
+ REG_S ra, STKOFF_RA(sp); \
+ PUSHARGS_##args; /* save syscall args */ \
+ CENABLE; \
+ REG_S v0, STKOFF_SVMSK(sp); /* save mask */ \
+ POPARGS_##args; /* restore syscall args */ \
+ .set noreorder; \
+ li v0, SYS_ify (syscall_name); \
+ syscall; \
+ .set reorder; \
+ REG_S v0, STKOFF_SC_V0(sp); /* save syscall result */ \
+ REG_S a3, STKOFF_SC_ERR(sp); /* save syscall error flag */ \
+ REG_L a0, STKOFF_SVMSK(sp); /* pass mask as arg1 */ \
+ CDISABLE; \
+ REG_L a3, STKOFF_SC_ERR(sp); /* restore syscall error flag */ \
+ REG_L ra, STKOFF_RA(sp); /* restore return address */ \
+ REG_L v0, STKOFF_SC_V0(sp); /* restore syscall result */ \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ /* manual cpreturn. */ \
+ REG_L gp, STKOFF_GP(sp); \
+ RESTORESTK ; \
+ L(pseudo_end):
+#endif
+
+# define PUSHARGS_0 /* nothing to do */
+# define PUSHARGS_1 PUSHARGS_0 REG_S a0, STKOFF_A0(sp);
+# define PUSHARGS_2 PUSHARGS_1 REG_S a1, STKOFF_A1(sp);
+# define PUSHARGS_3 PUSHARGS_2 REG_S a2, STKOFF_A2(sp);
+# define PUSHARGS_4 PUSHARGS_3 REG_S a3, STKOFF_A3(sp);
+# define PUSHARGS_5 PUSHARGS_4 REG_S a4, STKOFF_A4(sp);
+# define PUSHARGS_6 PUSHARGS_5 REG_S a5, STKOFF_A5(sp);
+
+# define POPARGS_0 /* nothing to do */
+# define POPARGS_1 POPARGS_0 REG_L a0, STKOFF_A0(sp);
+# define POPARGS_2 POPARGS_1 REG_L a1, STKOFF_A1(sp);
+# define POPARGS_3 POPARGS_2 REG_L a2, STKOFF_A2(sp);
+# define POPARGS_4 POPARGS_3 REG_L a3, STKOFF_A3(sp);
+# define POPARGS_5 POPARGS_4 REG_L a4, STKOFF_A4(sp);
+# define POPARGS_6 POPARGS_5 REG_L a5, STKOFF_A5(sp);
+
+/* Save an even number of slots. Should be 0 if an even number of slots
+ are used below, or SZREG if an odd number are used. */
+# define STK_PAD SZREG
+
+/* Place values that we are more likely to use later in this sequence, i.e.
+ closer to the SP at function entry. If you do that, the are more
+ likely to already be in your d-cache. */
+# define STKOFF_A5 (STK_PAD)
+# define STKOFF_A4 (STKOFF_A5 + SZREG)
+# define STKOFF_A3 (STKOFF_A4 + SZREG)
+# define STKOFF_A2 (STKOFF_A3 + SZREG) /* MT and more args. */
+# define STKOFF_A1 (STKOFF_A2 + SZREG) /* MT and 2 args. */
+# define STKOFF_A0 (STKOFF_A1 + SZREG) /* MT and 1 arg. */
+# define STKOFF_RA (STKOFF_A0 + SZREG) /* Used if MT. */
+# define STKOFF_SC_V0 (STKOFF_RA + SZREG) /* Used if MT. */
+# define STKOFF_SC_ERR (STKOFF_SC_V0 + SZREG) /* Used if MT. */
+# define STKOFF_SVMSK (STKOFF_SC_ERR + SZREG) /* Used if MT. */
+# define STKOFF_GP (STKOFF_SVMSK + SZREG) /* Always used. */
+
+# define STKSPACE (STKOFF_GP + SZREG)
+# define SAVESTK PTR_SUBU sp, STKSPACE
+# define RESTORESTK PTR_ADDU sp, STKSPACE
+
+# ifdef IS_IN_libpthread
+# define CENABLE PTR_LA t9, __pthread_enable_asynccancel; jalr t9;
+# define CDISABLE PTR_LA t9, __pthread_disable_asynccancel; jalr t9;
+# define __local_multiple_threads __pthread_multiple_threads
+# else
+# define CENABLE PTR_LA t9, __libc_enable_asynccancel; jalr t9;
+# define CDISABLE PTR_LA t9, __libc_disable_asynccancel; jalr t9;
+# define __local_multiple_threads __libc_multiple_threads
+# endif
+
+# if !defined NOT_IN_libc
+# define __local_multiple_threads __libc_multiple_threads
+# else
+# define __local_multiple_threads __pthread_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P(reg) lw reg, __local_multiple_threads
+#endif
+
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+
+#endif

View File

@ -1,20 +0,0 @@
2003-07-17 Guido Guenther <agx@sigxcpu.org>
* configure.in: pass $CFLAGS to ld --version-script test
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.401
diff -u -r1.401 configure.in
--- configure.in 3 Jul 2003 21:03:56 -0000 1.401
+++ configure.in 16 Jul 2003 18:35:18 -0000
@@ -1051,7 +1051,7 @@
global: sym;
} VERS_1;
EOF
- if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+ if ${CC-cc} -c $ASFLAGS $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
-o conftest.so conftest.o
-nostartfiles -nostdlib

View File

@ -1,132 +0,0 @@
2003-09-10 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Remove
"#if 0" surrounding most of contents.
(SYSCALL_ERROR_LABEL): Define.
(__SYSCALL_CLOBBERS): Add $10.
(internal_syscall7): Remove.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
Index: sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
--- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Fri Aug 15 19:35:02 2003
+++ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Wed Sep 10 11:00:07 2003
@@ -33,9 +33,16 @@
# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
#endif
+#ifdef __ASSEMBLER__
-#ifndef __ASSEMBLER__
-#if 0 /* untested */
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef __PIC__
+# define SYSCALL_ERROR_LABEL 99b
+#endif
+
+#else /* ! __ASSEMBLER__ */
+
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -227,37 +234,8 @@
} \
_sys_result; \
})
-
-#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({ \
- long _sys_result; \
- \
- { \
- register long long __v0 asm("$2"); \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
- register long long __a3 asm("$7") = (long long) arg4; \
- register long long __a4 asm("$8") = (long long) arg5; \
- register long long __a5 asm("$9") = (long long) arg6; \
- register long long __a6 asm("$10") = (long long) arg7; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5), "r" (__a6) \
- : __SYSCALL_CLOBBERS); \
- err = __a3; \
- _sys_result = __v0; \
- } \
- _sys_result; \
-})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
-#endif /* untested */
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
Index: sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
--- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Fri Aug 15 19:35:02 2003
+++ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Wed Sep 10 11:00:07 2003
@@ -33,9 +33,16 @@
# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
#endif
+#ifdef __ASSEMBLER__
-#ifndef __ASSEMBLER__
-#if 0 /* untested */
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef __PIC__
+# define SYSCALL_ERROR_LABEL 99b
+#endif
+
+#else /* ! __ASSEMBLER__ */
+
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -227,37 +234,8 @@
} \
_sys_result; \
})
-
-#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({ \
- long _sys_result; \
- \
- { \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- register long __a4 asm("$8") = (long) arg5; \
- register long __a5 asm("$9") = (long) arg6; \
- register long __a6 asm("$10") = (long) arg7; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5), "r" (__a6) \
- : __SYSCALL_CLOBBERS); \
- err = __a3; \
- _sys_result = __v0; \
- } \
- _sys_result; \
-})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
-#endif /* untested */
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */

View File

@ -1,21 +0,0 @@
--- sysdeps/mips/dl-machine.h.org Thu Apr 15 11:24:26 2004
+++ sysdeps/mips/dl-machine.h Thu Apr 15 11:38:28 2004
@@ -474,7 +474,7 @@
" STRINGXP(PTR_LA) " $25, _dl_start_user\n\
.globl _dl_start_user\n\
.type _dl_start_user,@function\n\
- .ent _dl_start_user\n\
+ .aent _dl_start_user\n\
_dl_start_user:\n\
" STRINGXP(SETUP_GP) "\n\
" STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
@@ -512,8 +512,7 @@
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
- jr $25\n\
- .end _dl_start_user\n\t"\
+ jr $25\n\t"\
_RTLD_EPILOGUE(ENTRY_POINT)\
".previous"\
);

View File

@ -1,137 +0,0 @@
2003-05-30 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/pread.c: include <stddef.h>
* sysdeps/unix/sysv/linux/mips/pread.c: handle __NR_N32_pread64,
__NR_O32_pread64 and __NR__N64_pread64.
* sysdeps/unix/sysv/linux/mips/pread64.c: likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: handle __NR_N32_pwrite64,
__NR_O32_pwrite64 and __NR__N64_pwrite64.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: likewise.
Index: sysdeps/unix/sysv/linux/mips//pread.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pread.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 pread.c
--- sysdeps/unix/sysv/linux/mips//pread.c 30 May 2003 17:41:46 -0000 1.11
+++ sysdeps/unix/sysv/linux/mips//pread.c 23 Jul 2003 11:49:51 -0000
@@ -33,6 +34,24 @@
# error "__NR_pread and __NR_pread64 both defined???"
# endif
# define __NR_pread __NR_pread64
+#endif
+#ifdef __NR_O32_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_O32_pread
+# error "__NR_O32_pread and __NR_O32_pread64 both defined???"
+# endif
+# define __NR_O32_pread __NR_O32_pread64
+#endif
+#ifdef __NR_N32_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N32_pread
+# error "__NR_N32_pread and __NR_N32_pread64 both defined???"
+# endif
+# define __NR_N32_pread __NR_N32_pread64
+#endif
+#ifdef __NR_N64_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N64_pread
+# error "__NR_N64_pread and __NR_N64_pread64 both defined???"
+# endif
+# define __NR_N64_pread __NR_N64_pread64
#endif
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
Index: sysdeps/unix/sysv/linux/mips//pread64.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pread64.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 pread64.c
--- sysdeps/unix/sysv/linux/mips//pread64.c 30 May 2003 17:41:46 -0000 1.11
+++ sysdeps/unix/sysv/linux/mips//pread64.c 23 Jul 2003 11:49:51 -0000
@@ -33,6 +33,24 @@
# endif
# define __NR_pread __NR_pread64
#endif
+#ifdef __NR_O32_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_O32_pread
+# error "__NR_O32_pread and __NR_O32_pread64 both defined???"
+# endif
+# define __NR_O32_pread __NR_O32_pread64
+#endif
+#ifdef __NR_N32_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N32_pread
+# error "__NR_N32_pread and __NR_N32_pread64 both defined???"
+# endif
+# define __NR_N32_pread __NR_N32_pread64
+#endif
+#ifdef __NR_N64_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N64_pread
+# error "__NR_N64_pread and __NR_N64_pread64 both defined???"
+# endif
+# define __NR_N64_pread __NR_N64_pread64
+#endif
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
Index: sysdeps/unix/sysv/linux/mips//pwrite.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pwrite.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 pwrite.c
--- sysdeps/unix/sysv/linux/mips//pwrite.c 30 May 2003 17:41:46 -0000 1.11
+++ sysdeps/unix/sysv/linux/mips//pwrite.c 23 Jul 2003 11:49:51 -0000
@@ -34,6 +34,24 @@
# endif
# define __NR_pwrite __NR_pwrite64
#endif
+#ifdef __NR_O32_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_O32_pwrite
+# error "__NR_O32_pwrite and __NR_O32_pwrite64 both defined???"
+# endif
+# define __NR_O32_pwrite __NR_O32_pwrite64
+#endif
+#ifdef __NR_N32_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N32_pwrite
+# error "__NR_N32_pwrite and __NR_N32_pwrite64 both defined???"
+# endif
+# define __NR_N32_pwrite __NR_N32_pwrite64
+#endif
+#ifdef __NR_N64_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N64_pwrite
+# error "__NR_N64_pwrite and __NR_N64_pwrite64 both defined???"
+# endif
+# define __NR_N64_pwrite __NR_N64_pwrite64
+#endif
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
Index: sysdeps/unix/sysv/linux/mips//pwrite64.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pwrite64.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 pwrite64.c
--- sysdeps/unix/sysv/linux/mips//pwrite64.c 30 May 2003 17:41:46 -0000 1.12
+++ sysdeps/unix/sysv/linux/mips//pwrite64.c 23 Jul 2003 11:49:51 -0000
@@ -33,6 +33,24 @@
# endif
# define __NR_pwrite __NR_pwrite64
#endif
+#ifdef __NR_O32_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_O32_pwrite
+# error "__NR_O32_pwrite and __NR_O32_pwrite64 both defined???"
+# endif
+# define __NR_O32_pwrite __NR_O32_pwrite64
+#endif
+#ifdef __NR_N32_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N32_pwrite
+# error "__NR_N32_pwrite and __NR_N32_pwrite64 both defined???"
+# endif
+# define __NR_N32_pwrite __NR_N32_pwrite64
+#endif
+#ifdef __NR_N64_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_N64_pwrite
+# error "__NR_N64_pwrite and __NR_N64_pwrite64 both defined???"
+# endif
+# define __NR_N64_pwrite __NR_N64_pwrite64
+#endif
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0

View File

@ -1,10 +0,0 @@
--- glibc-2.3.2/nptl/unwind.c.orig 2003-05-17 22:11:05.000000000 +0200
+++ glibc-2.3.2/nptl/unwind.c 2003-05-17 22:08:30.000000000 +0200
@@ -20,6 +20,7 @@
#include <setjmp.h>
#include <stdlib.h>
+#include <unistd.h>
#include "pthreadP.h"

View File

@ -1,29 +0,0 @@
--- malloc/malloc.c.orig 2004-01-03 18:36:23.000000000 -0500
+++ malloc/malloc.c 2004-01-03 18:46:16.000000000 -0500
@@ -311,6 +311,11 @@ extern "C" {
#define assert(x) ((void)0)
#endif
+/* needed for owl-malloc-unlink-sanity-check */
+#include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+#define ABORT_INSTRUCTION
+#endif
/*
INTERNAL_SIZE_T is the word-size used for internal bookkeeping
@@ -1951,6 +1956,14 @@ typedef struct malloc_chunk* mbinptr;
#define unlink(P, BK, FD) { \
FD = P->fd; \
BK = P->bk; \
+ /* owl-malloc-unlink-sanity-check */ \
+ if (FD->bk != P || BK->fd != P) \
+ { \
+ ABORT_INSTRUCTION; \
+ _exit(127); \
+ while (1) \
+ ABORT_INSTRUCTION; \
+ } \
FD->bk = BK; \
BK->fd = FD; \
}

View File

@ -1,144 +0,0 @@
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
--- glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c 2003-02-14 23:59:15.000000000 +0100
+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2003-11-08 21:32:03.000000000 +0100
@@ -184,6 +184,9 @@
_dl_debug_printf ("\ntransferring control: %s\n\n", argv[0]);
#endif
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org */
+
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist 2003-02-21 07:30:10.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2003-11-08 21:13:58.000000000 +0100
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile 2002-12-17 00:36:52.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2003-11-08 21:13:58.000000000 +0100
@@ -1,5 +1,5 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
endif
ifeq ($(subdir),db2)
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions 2002-12-17 00:28:17.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2003-11-08 21:13:58.000000000 +0100
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_PRIVATE {
# needed by libpthread.
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c 1970-01-01 01:00:00.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c 2003-11-08 21:13:58.000000000 +0100
@@ -0,0 +1,97 @@
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#ifdef _POSIX_SOURCE
+#include <signal.h>
+#endif
+
+#if defined(HAVE_SYSLOG)
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#include <sys/syslog.h>
+#ifndef _PATH_LOG
+#define _PATH_LOG "/dev/log"
+#endif
+#endif
+
+long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+
+void __guard_setup (void)
+{
+ int fd;
+ if (__guard[0]!=0) return;
+ fd = open ("/dev/urandom", 0);
+ if (fd != -1) {
+ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
+ close (fd) ;
+ if (size == sizeof(__guard)) return;
+ }
+ /* If a random generator can't be used, the protector switches the guard
+ to the "terminator canary" */
+ ((char*)__guard)[0] = 0; ((char*)__guard)[1] = 0;
+ ((char*)__guard)[2] = '\n'; ((char*)__guard)[3] = 255;
+}
+
+void __stack_smash_handler (char func[], int damaged)
+{
+#if defined (__GNU_LIBRARY__)
+ extern char * __progname;
+#endif
+ const char message[] = ": stack smashing attack in function ";
+ int bufsz = 512, len;
+ char buf[bufsz];
+#if defined(HAVE_SYSLOG)
+ int LogFile;
+ struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
+#endif
+#ifdef _POSIX_SOURCE
+ {
+ sigset_t mask;
+ sigfillset(&mask);
+ sigdelset(&mask, SIGABRT); /* Block all signal handlers */
+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
+ }
+#endif
+
+ strcpy(buf, "<2>"); len=3; /* send LOG_CRIT */
+#if defined (__GNU_LIBRARY__)
+ strncat(buf, __progname, bufsz-len-1); len = strlen(buf);
+#endif
+ if (bufsz>len) {strncat(buf, message, bufsz-len-1); len = strlen(buf);}
+ if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
+ /* print error message */
+ write (STDERR_FILENO, buf+3, len-3);
+#if defined(HAVE_SYSLOG)
+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
+
+ /*
+ * Send "found" message to the "/dev/log" path
+ */
+ SyslogAddr.sun_family = AF_UNIX;
+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
+ sizeof(SyslogAddr.sun_path) - 1);
+ SyslogAddr.sun_path[sizeof(SyslogAddr.sun_path) - 1] = '\0';
+ sendto(LogFile, buf, len, 0, (struct sockaddr *)&SyslogAddr,
+ sizeof(SyslogAddr));
+ }
+#endif
+
+#ifdef _POSIX_SOURCE
+ { /* Make sure the default handler is associated with SIGABRT */
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(struct sigaction));
+ sigfillset(&sa.sa_mask); /* Block all signals */
+ sa.sa_flags = 0;
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGABRT, &sa, NULL);
+ (void)kill(getpid(), SIGABRT);
+ }
+#endif
+ _exit(127);
+}
+

View File

@ -1,43 +0,0 @@
diff -Naur glibc-2.3.2-orig/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
--- glibc-2.3.2-orig/sysdeps/generic/libc-start.c 2004-05-10 01:59:09.000000000 -0400
+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2004-05-10 02:06:00.865611770 -0400
@@ -188,6 +188,9 @@
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
+
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2004-05-10 02:06:54.862038647 -0400
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2004-05-10 02:07:50.709582758 -0400
@@ -1,5 +1,5 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
endif
ifeq ($(subdir),assert)
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2004-05-10 02:10:30.410716176 -0400
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_2.3.3 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;

View File

@ -1,144 +0,0 @@
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
--- glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c 2003-02-14 23:59:15.000000000 +0100
+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2003-11-08 21:32:03.000000000 +0100
@@ -149,6 +149,9 @@
{
/* XXX This is where the try/finally handling must be used. */
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org */
+
result = main (argc, argv, __environ);
}
#ifdef HAVE_CANCELBUF
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist 2003-02-21 07:30:10.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2003-11-08 21:13:58.000000000 +0100
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile 2002-12-17 00:36:52.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2003-11-08 21:13:58.000000000 +0100
@@ -1,5 +1,5 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
endif
ifeq ($(subdir),db2)
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions 2002-12-17 00:28:17.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2003-11-08 21:13:58.000000000 +0100
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_PRIVATE {
# needed by libpthread.
diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c
--- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c 1970-01-01 01:00:00.000000000 +0100
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c 2003-11-08 21:13:58.000000000 +0100
@@ -0,0 +1,97 @@
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#ifdef _POSIX_SOURCE
+#include <signal.h>
+#endif
+
+#if defined(HAVE_SYSLOG)
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#include <sys/syslog.h>
+#ifndef _PATH_LOG
+#define _PATH_LOG "/dev/log"
+#endif
+#endif
+
+long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+
+void __guard_setup (void)
+{
+ int fd;
+ if (__guard[0]!=0) return;
+ fd = open ("/dev/urandom", 0);
+ if (fd != -1) {
+ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
+ close (fd) ;
+ if (size == sizeof(__guard)) return;
+ }
+ /* If a random generator can't be used, the protector switches the guard
+ to the "terminator canary" */
+ ((char*)__guard)[0] = 0; ((char*)__guard)[1] = 0;
+ ((char*)__guard)[2] = '\n'; ((char*)__guard)[3] = 255;
+}
+
+void __stack_smash_handler (char func[], int damaged)
+{
+#if defined (__GNU_LIBRARY__)
+ extern char * __progname;
+#endif
+ const char message[] = ": stack smashing attack in function ";
+ int bufsz = 512, len;
+ char buf[bufsz];
+#if defined(HAVE_SYSLOG)
+ int LogFile;
+ struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
+#endif
+#ifdef _POSIX_SOURCE
+ {
+ sigset_t mask;
+ sigfillset(&mask);
+ sigdelset(&mask, SIGABRT); /* Block all signal handlers */
+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
+ }
+#endif
+
+ strcpy(buf, "<2>"); len=3; /* send LOG_CRIT */
+#if defined (__GNU_LIBRARY__)
+ strncat(buf, __progname, bufsz-len-1); len = strlen(buf);
+#endif
+ if (bufsz>len) {strncat(buf, message, bufsz-len-1); len = strlen(buf);}
+ if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
+ /* print error message */
+ write (STDERR_FILENO, buf+3, len-3);
+#if defined(HAVE_SYSLOG)
+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
+
+ /*
+ * Send "found" message to the "/dev/log" path
+ */
+ SyslogAddr.sun_family = AF_UNIX;
+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
+ sizeof(SyslogAddr.sun_path) - 1);
+ SyslogAddr.sun_path[sizeof(SyslogAddr.sun_path) - 1] = '\0';
+ sendto(LogFile, buf, len, 0, (struct sockaddr *)&SyslogAddr,
+ sizeof(SyslogAddr));
+ }
+#endif
+
+#ifdef _POSIX_SOURCE
+ { /* Make sure the default handler is associated with SIGABRT */
+ struct sigaction sa;
+
+ memset(&sa, 0, sizeof(struct sigaction));
+ sigfillset(&sa.sa_mask); /* Block all signals */
+ sa.sa_flags = 0;
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGABRT, &sa, NULL);
+ (void)kill(getpid(), SIGABRT);
+ }
+#endif
+ _exit(127);
+}
+

View File

@ -1,29 +0,0 @@
--- elf/elf.h.orig 2004-01-26 12:54:15.000000000 -0500
+++ elf/elf.h 2004-01-26 12:53:23.000000000 -0500
@@ -568,6 +568,7 @@
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
#define PT_LOSUNW 0x6ffffffa
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
@@ -581,6 +582,18 @@
#define PF_X (1 << 0) /* Segment is executable */
#define PF_W (1 << 1) /* Segment is writable */
#define PF_R (1 << 2) /* Segment is readable */
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
#define PF_MASKOS 0x0ff00000 /* OS-specific */
#define PF_MASKPROC 0xf0000000 /* Processor-specific */

View File

@ -1,58 +0,0 @@
--- glibc-2.3.2-net/linuxthreads/Makefile 13 May 2003 19:51:57 -0000 1.1.1.46
+++ glibc-2.3.2-redhat/linuxthreads/Makefile 13 May 2003 20:07:01 -0000 1.25
@@ -217,15 +217,18 @@ $(addprefix $(objpfx), \
$(filter-out $(tests-static) $(tests-reverse) unload, \
$(tests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking.
$(addprefix $(objpfx), $(tests-reverse)): \
- $(objpfx)../libc.so $(objpfx)libpthread.so \
+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
$(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.so
$(objpfx)unload: $(common-objpfx)dlfcn/libdl.so
$(objpfx)unload.out: $(objpfx)libpthread.so $(objpfx)libpthread_nonshared.a
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
+ ln -s ../libc.so $@
+generated += libclink.so
else
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
$(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.a
--- glibc-2.3.2-net/linuxthreads/cancel.c 22 Feb 2003 16:58:54 -0000 1.1.1.15
+++ glibc-2.3.2-redhat/linuxthreads/cancel.c 23 Feb 2003 21:15:06 -0000 1.10
@@ -230,5 +230,6 @@ void __pthread_perform_cleanup(char *cur
}
/* And the TSD which needs special help. */
+ THREAD_SETMEM (self, p_cancelstate, PTHREAD_CANCEL_DISABLE);
__libc_thread_freeres ();
}
--- glibc-2.3.2-net/linuxthreads/lockfile.c 18 Dec 2002 12:43:50 -0000 1.1.1.7
+++ glibc-2.3.2-redhat/linuxthreads/lockfile.c 18 Dec 2002 12:48:17 -0000 1.8
@@ -74,7 +74,11 @@ __fresetlockfiles (void)
__pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);
for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
- __pthread_mutex_init (_IO_iter_file(i)->_lock, &attr);
+ {
+ _IO_lock_t *_lock = _IO_iter_file(i)->_lock;
+ if (_lock)
+ __pthread_mutex_init (_lock, &attr);
+ }
__pthread_mutexattr_destroy (&attr);
--- glibc-2.3.2-net/linuxthreads/semaphore.h 25 Jun 2001 11:31:17 -0000 1.1.1.6
+++ glibc-2.3.2-redhat/linuxthreads/semaphore.h 5 Apr 2002 10:02:50 -0000 1.2
@@ -21,6 +21,7 @@
# define __need_timespec
# include <time.h>
#endif
+#include <bits/pthreadtypes.h>
#ifndef _PTHREAD_DESCR_DEFINED
/* Thread descriptors. Needed for `sem_t' definition. */

View File

@ -1,25 +0,0 @@
--- glibc-2.3.2-net/nptl/Makefile 15 May 2003 13:07:24 -0000 1.1.1.45
+++ glibc-2.3.2-redhat/nptl/Makefile 15 May 2003 13:28:12 -0000 1.50
@@ -330,15 +330,19 @@ $(addprefix $(objpfx), \
$(tests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking.
$(addprefix $(objpfx), $(tests-reverse)): \
- $(objpfx)../libc.so $(objpfx)libpthread.so \
+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
$(addprefix $(objpfx),$(tests-static)): $(objpfx)libpthread.a
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
+
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
+ ln -s ../libc.so $@
+generated += libclink.so
else
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif

View File

@ -1,23 +0,0 @@
--- glibc-2.3.2/elf/rtld.c 2004-02-03 19:52:59.420623568 +0200
+++ glibc-2.3.2.rtld/elf/rtld.c 2004-02-03 19:53:20.505418192 +0200
@@ -1280,19 +1280,7 @@ of this helper program; chances are you
while (GL(dl_loaded)->l_searchlist.r_list[i] != &GL(dl_rtld_map))
++i;
GL(dl_rtld_map).l_prev = GL(dl_loaded)->l_searchlist.r_list[i - 1];
- if (__builtin_expect (mode, normal) == normal)
- GL(dl_rtld_map).l_next = (i + 1 < GL(dl_loaded)->l_searchlist.r_nlist
- ? GL(dl_loaded)->l_searchlist.r_list[i + 1]
- : NULL);
- else
- /* In trace mode there might be an invisible object (which we
- could not find) after the previous one in the search list.
- In this case it doesn't matter much where we put the
- interpreter object, so we just initialize the list pointer so
- that the assertion below holds. */
- GL(dl_rtld_map).l_next = GL(dl_rtld_map).l_prev->l_next;
-
- assert (GL(dl_rtld_map).l_prev->l_next == GL(dl_rtld_map).l_next);
+ GL(dl_rtld_map).l_next = GL(dl_rtld_map).l_prev->l_next;
GL(dl_rtld_map).l_prev->l_next = &GL(dl_rtld_map);
if (GL(dl_rtld_map).l_next != NULL)
{

View File

@ -1,149 +0,0 @@
From bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org Tue Aug 05 19:52:26 2003
Return-Path: <bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org>
Delivered-To: listarch-bug-glibc at sources dot redhat dot com
Received: (qmail 31779 invoked from network); 5 Aug 2003 19:52:26 -0000
Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173)
by sources dot redhat dot com with SMTP; 5 Aug 2003 19:52:26 -0000
Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
by monty-python dot gnu dot org with esmtp (Exim 4 dot 20)
id 19k7hp-0004mC-J0
for listarch-bug-glibc at sources dot redhat dot com; Tue, 05 Aug 2003 15:42:49 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20)
id 19k7hd-0004lI-No
for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:37 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20)
id 19k7h7-0004TP-8U
for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:36 -0400
Received: from [32.97.182.102] (helo=e2.ny.us.ibm.com)
by monty-python dot gnu dot org with esmtp (Exim 4 dot 20) id 19k7h6-0004TH-V4
for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:05 -0400
Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com
[9 dot 56 dot 224 dot 150])
by e2 dot ny dot us dot ibm dot com (8 dot 12 dot 9/8 dot 12 dot 2) with ESMTP id h75Jg3PS037034;
Tue, 5 Aug 2003 15:42:03 -0400
Received: from D01ML249.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216])
by northrelay02 dot pok dot ibm dot com (8 dot 12 dot 9/NCO/VER6 dot 5) with ESMTP id
h75Jg2vu131828; Tue, 5 Aug 2003 15:42:02 -0400
Importance: Normal
MIME-Version: 1.0
Sensitivity:
To: schwab at suse dot de, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002
From: William Jay Huie <wjhuie at us dot ibm dot com>
Message-ID: <OF3D561D81.1A9679A6-ON85256D79.00619378-85256D79.006DAF9F@us.ibm.com>
Date: Tue, 5 Aug 2003 15:41:56 -0400
X-MIMETrack: Serialize by Router on D01ML249/01/M/IBM(Release 6.0.1 [IBM]|June
10, 2003) at 08/05/2003 15:42:02,
Serialize complete at 08/05/2003 15:42:02
Cc: bug-glibc at gnu dot org
Subject: fixed building gcc-2.3.2 on s390
X-BeenThere: bug-glibc@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for the GNU standard C library <bug-glibc.gnu.org>
List-Archive: <http://mail.gnu.org/pipermail/bug-glibc>
List-Post: <mailto:bug-glibc at gnu dot org>
List-Help: <mailto:bug-glibc-request at gnu dot org?subject=help>
List-Subscribe: <http://mail dot gnu dot org/mailman/listinfo/bug-glibc>,
<mailto:bug-glibc-request at gnu dot org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1920858710=="
Sender: bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org
Errors-To: bug-glibc-bounces+listarch-bug-glibc=sources.redhat.com@gnu.org
This is a multipart message in MIME format.
--===============1920858710==
Content-Type: multipart/alternative;
boundary="=_alternative 006DAF4085256D79_="
This is a multipart message in MIME format.
--=_alternative 006DAF4085256D79_=
Content-Type: text/plain; charset="us-ascii"
The problem was related to a file including an obsolete header file.
Checking /usr/include/sys/ustat.h shows the following comment;
/*
* This interface is obsolete. Use <sys/statfs.h>
instead.
*/
Changing the include in the offending file;
osatest2:/usr/src/packages/SOURCES/glibc-2.3.2/sysdeps/unix/sysv/linux #
diff -u old.ustat.c ustat.c
--- old.ustat.c 2001-07-07 12:21:32.000000000 -0700
+++ ustat.c 2003-08-05 11:24:20.000000000 -0700
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <errno.h>
-#include <sys/ustat.h>
+#include <sys/statfs.h>
#include <sys/sysmacros.h>
#include <sysdep.h>
Things then build correctly,
This is on a SLES-8 s390 31bit system using glibc levels 2.2.5-92.
j
Jay Huie
wjhuie@us.ibm.com
zSeries Linux System Test
Phone: 845-435-8164
--=_alternative 006DAF4085256D79_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">The problem was related to a file including an obsolete header file.</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Checking /usr/include/sys/ustat.h shows the following comment;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* This interface is obsolete. &nbsp;Use &lt;sys/statfs.h&gt; instead.</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Changing the include in the offending file;</font>
<br>
<br><font size=2 face="sans-serif">osatest2:/usr/src/packages/SOURCES/glibc-2.3.2/sysdeps/unix/sysv/linux # diff -u old.ustat.c ustat.c</font>
<br><font size=2 face="sans-serif">--- old.ustat.c 2001-07-07 12:21:32.000000000 -0700</font>
<br><font size=2 face="sans-serif">+++ ustat.c &nbsp; &nbsp; 2003-08-05 11:24:20.000000000 -0700</font>
<br><font size=2 face="sans-serif">@@ -18,7 +18,7 @@</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; 02111-1307 USA. &nbsp;*/</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;#include &lt;errno.h&gt;</font>
<br><font size=2 face="sans-serif">-#include &lt;sys/ustat.h&gt;</font>
<br><font size=2 face="sans-serif">+#include &lt;sys/statfs.h&gt;</font>
<br><font size=2 face="sans-serif">&nbsp;#include &lt;sys/sysmacros.h&gt;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp;#include &lt;sysdep.h&gt;<br>
</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Things then build correctly,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; This is on a SLES-8 s390 31bit system using glibc levels 2.2.5-92.</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; j</font>
<br><font size=2 face="sans-serif"><br>
Jay Huie <br>
&nbsp;wjhuie@us.ibm.com<br>
&nbsp;zSeries Linux System Test<br>
&nbsp;Phone: 845-435-8164<br>
</font>
--=_alternative 006DAF4085256D79_=--
--===============1920858710==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Bug-glibc mailing list
Bug-glibc@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-glibc
--===============1920858710==--

View File

@ -1,40 +0,0 @@
--- ./sysdeps/unix/sysv/linux/ssp.c.orig 2004-01-23 19:54:19.000000000 -0500
+++ ./sysdeps/unix/sysv/linux/ssp.c 2004-01-23 19:56:34.000000000 -0500
@@ -52,8 +52,8 @@
{
sigset_t mask;
sigfillset(&mask);
- sigdelset(&mask, SIGABRT); /* Block all signal handlers */
- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
+ sigdelset(&mask, SIGSEGV); /* Block all signal handlers */
+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGSEGV */
}
#endif
@@ -65,6 +65,7 @@
if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
/* print error message */
write (STDERR_FILENO, buf+3, len-3);
+ write (STDERR_FILENO, "()\n", 3);
#if defined(HAVE_SYSLOG)
if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
@@ -81,15 +82,15 @@
#endif
#ifdef _POSIX_SOURCE
- { /* Make sure the default handler is associated with SIGABRT */
+ { /* Make sure the default handler is associated with SIGSEGV */
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sigfillset(&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
- sigaction(SIGABRT, &sa, NULL);
- (void)kill(getpid(), SIGABRT);
+ sigaction(SIGSEGV, &sa, NULL);
+ (void)kill(getpid(), SIGSEGV);
}
#endif
_exit(127);

View File

@ -1,90 +0,0 @@
/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
#include <kernel-features.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
/* Advice the system about the expected behaviour of the application with
respect to the file associated with FD. */
struct fadvise64_64_layout
{
int fd;
off64_t offset;
off64_t len;
int advise;
};
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
#ifdef __NR_fadvise64_64
struct fadvise64_64_layout parameters;
INTERNAL_SYSCALL_DECL (err);
parameters.fd = fd;
parameters.offset = offset;
parameters.len = len;
parameters.advise = advise;
int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, &parameters);
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
# ifndef __ASSUME_FADVISE64_64_SYSCALL
if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
# endif
return INTERNAL_SYSCALL_ERRNO (ret, err);
#endif
#ifndef __ASSUME_FADVISE64_64_SYSCALL
# ifdef __NR_fadvise64
if (len != (off_t) len)
return EOVERFLOW;
INTERNAL_SYSCALL_DECL (err2);
int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
__LONG_LONG_PAIR ((long) (offset >> 32),
(long) offset),
(off_t) len, advise);
if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
return 0;
return INTERNAL_SYSCALL_ERRNO (ret2, err2);
# else
return ENOSYS;
# endif
#endif
}
#include <shlib-compat.h>
#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
int
__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
{
return __posix_fadvise64_l64 (fd, offset, len, advise);
}
versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
#else
strong_alias (__posix_fadvise64_l64, posix_fadvise64);
#endif

View File

@ -1,160 +0,0 @@
/*
* Distributed under the terms of the GNU General Public License v2
* $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.2/ssp.c,v 1.1 2004/06/05 15:54:29 tseng Exp $
*
* This is a modified version of Hiroaki Etoh's stack smashing routines
* implemented for glibc.
*
* The following people have contributed input to this code.
* Ned Ludd - <solar[@]gentoo.org>
* Alexander Gabert - <pappy[@]gentoo.org>
* The PaX Team - <pageexec[@]freemail.hu>
* Peter S. Mazinger - <ps.m[@]gmx.net>
* Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
* Robert Connolly - <robert[@]linuxfromscratch.org>
* Cory Visi <cory@visi.name>
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/syslog.h>
#include <sys/time.h>
#include <sys/sysctl.h>
#ifndef _PATH_LOG
#define _PATH_LOG "/dev/log"
#endif
#ifdef __PROPOLICE_BLOCK_SEGV__
#define SSP_SIGTYPE SIGSEGV
#elif __PROPOLICE_BLOCK_KILL__
#define SSP_SIGTYPE SIGKILL
#else
#define SSP_SIGTYPE SIGABRT
#endif
unsigned long __guard = 0UL;
void
__guard_setup (void)
{
size_t size;
#ifdef HAVE_DEV_ERANDOM
int mib[3];
#endif
if (__guard != 0UL)
return;
#ifndef __SSP_QUICK_CANARY__
#ifdef HAVE_DEV_ERANDOM
/* Random is another depth in Linux, hence an array of 3. */
mib[0] = CTL_KERN;
mib[1] = KERN_RANDOM;
mib[2] = RANDOM_ERANDOM;
size = sizeof (unsigned long);
if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
if (__guard != 0UL)
return;
#endif
/*
* Attempt to open kernel pseudo random device if one exists before
* opening urandom to avoid system entropy depletion.
*/
{
int fd;
#ifdef HAVE_DEV_ERANDOM
if ((fd = open ("/dev/erandom", O_RDONLY)) == (-1))
#endif
fd = open ("/dev/urandom", O_RDONLY);
if (fd != (-1))
{
size = read (fd, (char *) &__guard, sizeof (__guard));
close (fd);
if (size == sizeof (__guard))
return;
}
}
#endif
/* If sysctl was unsuccessful, use the "terminator canary". */
__guard = 0xFF0A0D00UL;
{
/* Everything failed? Or we are using a weakened model of the
* terminator canary */
struct timeval tv;
gettimeofday (&tv, NULL);
__guard ^= tv.tv_usec ^ tv.tv_sec;
}
}
void
__stack_smash_handler (char func[], int damaged)
{
struct sockaddr_un sock; /* AF_UNIX address of local logger */
struct sigaction sa;
const char message[] = ": stack smashing attack in function ";
int bufsz, len, log;
char buf[512];
extern char *__progname;
sigset_t mask;
sigfillset (&mask);
sigdelset (&mask, SSP_SIGTYPE); /* Block all signal handlers */
sigprocmask (SIG_BLOCK, &mask, NULL); /* except SIGABRT */
bufsz = sizeof (buf);
strcpy (buf, "<2>");
len = 3;
strncat (buf, __progname, sizeof (buf) - 4);
len = strlen (buf);
if (bufsz > len)
{
strncat (buf, message, bufsz - len - 1);
len = strlen (buf);
}
if (bufsz > len)
{
strncat (buf, func, bufsz - len - 1);
len = strlen (buf);
}
/* print error message */
write (STDERR_FILENO, buf + 3, len - 3);
write (STDERR_FILENO, "()\n", 3);
if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
{
/* Send "found" message to the "/dev/log" path */
sock.sun_family = AF_UNIX;
(void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
}
/* Make sure the default handler is associated with the our signal handler */
memset (&sa, 0, sizeof (struct sigaction));
sigfillset (&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigaction (SSP_SIGTYPE, &sa, NULL);
(void) kill (getpid (), SSP_SIGTYPE);
_exit (127);
}

View File

@ -1,69 +0,0 @@
/* Definitions of macros to access `dev_t' values.
Copyright (C) 1996, 1997, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _SYS_SYSMACROS_H
#define _SYS_SYSMACROS_H 1
#include <features.h>
/* If the compiler does not know long long it is out of luck. We are
not going to hack weird hacks to support the dev_t representation
they need. */
#ifdef __GLIBC_HAVE_LONG_LONG
__extension__
extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
__THROW;
__extension__
extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
__THROW;
__extension__
extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
__THROW;
# if defined __GNUC__ && __GNUC__ >= 2
__extension__ extern __inline unsigned int
gnu_dev_major (unsigned long long int __dev) __THROW
{
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}
__extension__ extern __inline unsigned int
gnu_dev_minor (unsigned long long int __dev) __THROW
{
return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
__extension__ extern __inline unsigned long long int
gnu_dev_makedev (unsigned int __major, unsigned int __minor) __THROW
{
return ((__minor & 0xff) | ((__major & 0xfff) << 8)
| (((unsigned long long int) (__minor & ~0xff)) << 12)
| (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# endif
/* Access the functions with their traditional names. */
# define major(dev) gnu_dev_major (dev)
# define minor(dev) gnu_dev_minor (dev)
# define makedev(maj, min) gnu_dev_makedev (maj, min)
#endif
#endif /* sys/sysmacros.h */

View File

@ -1,43 +0,0 @@
diff -Naur glibc-2.3.2-orig/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
--- glibc-2.3.2-orig/sysdeps/generic/libc-start.c 2004-05-10 01:59:09.000000000 -0400
+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2004-05-10 02:06:00.865611770 -0400
@@ -188,6 +188,9 @@
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
+
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2004-05-10 02:06:54.862038647 -0400
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2004-05-10 02:07:50.709582758 -0400
@@ -1,5 +1,5 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
endif
ifeq ($(subdir),assert)
diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions 2004-05-10 01:59:10.000000000 -0400
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2004-05-10 02:10:30.410716176 -0400
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_2.3.3 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;

View File

@ -1,70 +0,0 @@
--- glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c 2003-12-13 15:42:16.853396224 +0200
+++ glibc-2.3.3.PaX/sysdeps/unix/sysv/linux/dl-execstack.c 2003-12-13 15:42:25.290113648 +0200
@@ -47,11 +47,17 @@
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
goto return_success;
# if __ASSUME_PROT_GROWSUPDOWN == 0
- if (errno == EINVAL)
+ if (errno == EINVAL) {
no_growsdown = true;
- else
+ } else {
+# endif
+ if (errno == EACCES) /* PAX is enabled */
+ return 0;
+ else
+ return errno;
+# if __ASSUME_PROT_GROWSUPDOWN == 0
+ }
# endif
- return errno;
}
# endif
@@ -73,8 +79,11 @@
page -= size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GL(dl_pagesize))
/* We just tried to mprotect the top hole page and failed.
@@ -105,11 +114,17 @@
PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
goto return_success;
# if __ASSUME_PROT_GROWSUPDOWN == 0
- if (errno == EINVAL)
+ if (errno == EINVAL) {
no_growsup = true;
- else
+ } else {
+# endif
+ if (errno == EACCES) /* PAX is enabled */
+ return 0;
+ else
+ return errno;
+# if __ASSUME_PROT_GROWSUPDOWN == 0
+ }
# endif
- return errno;
}
# endif
@@ -130,8 +145,11 @@
page += size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GL(dl_pagesize))
/* We just tried to mprotect the lowest hole page and failed.

View File

@ -1,52 +0,0 @@
diff -Naur glibc-2.3.2-orig/config.h.in glibc-2.3.2/config.h.in
--- glibc-2.3.2-orig/config.h.in 2004-05-11 21:44:51.000000000 -0400
+++ glibc-2.3.2/config.h.in 2004-05-11 22:41:34.903935791 -0400
@@ -208,6 +208,9 @@
/* Defined of libidn is available. */
#undef HAVE_LIBIDN
+/* Defined if economical random device is available. */
+#undef HAVE_DEV_ERANDOM
+
/*
*/
diff -Naur glibc-2.3.2-orig/configure.in glibc-2.3.2/configure.in
--- glibc-2.3.2-orig/configure.in 2004-05-11 21:44:51.000000000 -0400
+++ glibc-2.3.2/configure.in 2004-05-11 22:32:57.999546229 -0400
@@ -289,6 +289,13 @@
[])
AC_SUBST(all_warnings)
+dnl See whether the user wants to disable checking for /dev/erandom
+AC_ARG_ENABLE([dev-erandom],
+ AC_HELP_STRING([--disable-dev-erandom],
+ [disable testing for /dev/erandom]),
+ [try_dev_erandom=$enableval],
+ [try_dev_erandom=yes])
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a
@@ -1911,6 +1918,21 @@
sizeof_long_double=$ac_cv_sizeof_long_double
AC_SUBST(sizeof_long_double)
+dnl check whether we have an economical random device
+if test "$try_dev_erandom" = yes ; then
+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
+ [if test -r "/dev/erandom" ; then
+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
+ if test "$ac_cv_have_dev_erandom" = yes; then
+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
+ [defined if the system supports an economical random device] )
+ fi
+else
+ AC_MSG_CHECKING(for economical random device)
+ ac_cv_have_dev_erandom=no
+ AC_MSG_RESULT(has been disabled)
+fi
+
### End of automated tests.
### Now run sysdeps configure fragments.

View File

@ -1,68 +0,0 @@
#! /bin/sh -e
# DP: Description: Fix localedef segfault when run under exec-shield,
# PaX or similar. (#231438, #198099)
# DP: Dpatch Author: James Troup <james@nocrew.org>
# DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
# DP: Upstream status: Unknown
# DP: Status Details: Unknown
# DP: Date: 2004-03-16
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- glibc-2.3.3-net/locale/programs/3level.h 16 Jun 2003 07:19:09 -0000 1.1.1.5
+++ glibc-2.3.3-redhat/locale/programs/3level.h 16 Jun 2003 09:32:40 -0000 1.4
@@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
}
}
}
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+ to inlined functions. Help it a little bit with this hack. */
+#define wchead_table_iterate(tp, fn) \
+do \
+ { \
+ struct wchead_table *t = (tp); \
+ uint32_t index1; \
+ for (index1 = 0; index1 < t->level1_size; index1++) \
+ { \
+ uint32_t lookup1 = t->level1[index1]; \
+ if (lookup1 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup1_shifted = lookup1 << t->q; \
+ uint32_t index2; \
+ for (index2 = 0; index2 < (1 << t->q); index2++) \
+ { \
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
+ if (lookup2 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup2_shifted = lookup2 << t->p; \
+ uint32_t index3; \
+ for (index3 = 0; index3 < (1 << t->p); index3++) \
+ { \
+ struct element_t *lookup3 \
+ = t->level3[index3 + lookup2_shifted]; \
+ if (lookup3 != NULL) \
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
+ lookup3); \
+ } \
+ } \
+ } \
+ } \
+ } \
+ } while (0)
+
#endif
#ifndef NO_FINALIZE

View File

@ -1,52 +0,0 @@
Index: sysdeps/mips/mips64/n32/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/mips64/n32/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- sysdeps/mips/mips64/n32/Makefile 29 Mar 2003 08:15:28 -0000 1.2
+++ sysdeps/mips/mips64/n32/Makefile 14 May 2004 05:32:32 -0000
@@ -2,5 +2,9 @@
long-double-fcts = yes
ifeq ($(filter -mabi=n32,$(CC)),)
-CC += -mabi=n32
+CC += -mabi=n32
endif
+ifeq ($(filter "-Wl,-m,elf32btsmipn32",$(LD)),)
+LD += -Wl,-m,elf32btsmipn32
+endif
+ABI_FLAG= -Wl,-m,elf32btsmipn32
Index: sysdeps/mips/mips64/n64/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/mips64/n64/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- sysdeps/mips/mips64/n64/Makefile 29 Mar 2003 08:15:28 -0000 1.2
+++ sysdeps/mips/mips64/n64/Makefile 14 May 2004 05:32:32 -0000
@@ -4,3 +4,10 @@
ifeq ($(filter -mabi=64,$(CC)),)
CC += -mabi=64
endif
+ifeq ($(filter "-Wl,-m,elf64btsmip",$(LDFLAGS)),)
+LDFLAGS += -Wl,-m,elf64btsmip
+endif
+ifeq ($(filter "-Wl,-m,elf64btsmip",$(ASFLAGS-.os)),)
+ASFLAGS-.os += -Wl,-m,elf64btsmip
+endif
+ABI_FLAG= -Wl,-m,elf64btsmip
Index: csu/Makefile
===================================================================
RCS file: /cvs/glibc/libc/csu/Makefile,v
retrieving revision 1.73
diff -u -r1.73 Makefile
--- csu/Makefile 8 Mar 2004 21:28:15 -0000 1.73
+++ csu/Makefile 14 May 2004 05:32:18 -0000
@@ -146,7 +147,7 @@
subdir_lib: $(extra-objs:%=$(objpfx)%)
define link-relocatable
-$(CC) -nostdlib -nostartfiles -r -o $@ $^
+$(CC) $(ABI_FLAG) -nostdlib -nostartfiles -r -o $@ $^
endef
ifndef start-installed-name-rule

View File

@ -1,32 +0,0 @@
Index: sysdeps/unix/sysv/linux/configure
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/configure,v
retrieving revision 1.86
diff -u -r1.86 configure
--- sysdeps/unix/sysv/linux/configure 23 Mar 2003 02:10:04 -0000 1.86
+++ sysdeps/unix/sysv/linux/configure 1 Jun 2004 04:25:42 -0000
@@ -224,8 +224,7 @@
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
- mips/mips64/n64/* )
+ sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 )
libc_cv_slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
@@ -233,14 +232,6 @@
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
;;
- mips/mips64/n32/* )
- libc_cv_slibdir="/lib32"
- if test "$libdir" = '${exec_prefix}/lib'; then
- libdir='${exec_prefix}/lib32';
- # Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
- fi
- ;;
*)
libc_cv_slibdir="/lib"
;;

View File

@ -1,12 +0,0 @@
Index: sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list,v
retrieving revision 1.2
diff -u -r1.2 syscalls.list
--- sysdeps/unix/sysv/linux/mips/mips64/syscalls.list 3 Sep 2003 03:16:25 -0000 1.2
+++ sysdeps/unix/sysv/linux/mips/mips64/syscalls.list 14 May 2004 05:32:37 -0000
@@ -18,3 +18,4 @@
semop - semop i:ipi __semop semop
semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
+semtimedop - semtimedop i:ipip semtimedop

View File

@ -1,30 +0,0 @@
This patch actually makes file identical to default implementaion..
Index: sysdeps/unix/sysv/linux/mips/sys/syscall.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sys/syscall.h,v
retrieving revision 1.8
diff -u -r1.8 syscall.h
--- sysdeps/unix/sysv/linux/mips/sys/syscall.h 17 Mar 2003 15:50:05 -0000 1.8
+++ sysdeps/unix/sysv/linux/mips/sys/syscall.h 14 May 2004 17:03:29 -0000
@@ -19,17 +19,10 @@
#ifndef _SYSCALL_H
#define _SYSCALL_H 1
-/* This file should list the numbers of the system the system knows.
- But instead of duplicating this we use the information available
- from the kernel sources. */
-#ifdef _LIBC
-/* Since the kernel doesn't define macro names in a way usable for
- glibc, we preprocess this header, and use it during the glibc build
- process. */
-# include <asm-unistd.h>
-#else
+/* This file should list the numbers of the system calls the system
+ knows. But instead of duplicating this we use the information
+ available from the kernel sources. */
# include <asm/unistd.h>
-#endif
#ifndef _LIBC
/* The Linux kernel header file defines macros `__NR_<name>', but some

View File

@ -1,52 +0,0 @@
Index: sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h,v
retrieving revision 1.3
diff -u -r1.3 sysdep.h
--- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h 1 Oct 2003 06:59:39 -0000 1.3
+++ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h 14 May 2004 19:01:28 -0000
@@ -28,9 +28,9 @@
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_N32_##syscall_name
+# define SYS_ify(syscall_name) __NR_##syscall_name
#else
-# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
#ifdef __ASSEMBLER__
Index: sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h,v
retrieving revision 1.3
diff -u -r1.3 sysdep.h
--- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h 1 Oct 2003 06:59:40 -0000 1.3
+++ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h 14 May 2004 19:01:28 -0000
@@ -28,9 +28,9 @@
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_N64_##syscall_name
+# define SYS_ify(syscall_name) __NR_##syscall_name
#else
-# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
#ifdef __ASSEMBLER__
--- sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h.orig 2004-05-18 14:51:16.000000000 -0700
+++ sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h 2004-05-19 15:07:23.000000000 -0700
@@ -28,9 +28,9 @@
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_O32_##syscall_name
+# define SYS_ify(syscall_name) __NR_##syscall_name
#else
-# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
#endif /* linux/mips/mips32/kern64/sysdep.h */

View File

@ -1,29 +0,0 @@
--- malloc/malloc.c.orig 2004-01-03 18:36:23.000000000 -0500
+++ malloc/malloc.c 2004-01-03 18:46:16.000000000 -0500
@@ -311,6 +311,11 @@ extern "C" {
#define assert(x) ((void)0)
#endif
+/* needed for owl-malloc-unlink-sanity-check */
+#include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+#define ABORT_INSTRUCTION
+#endif
/*
INTERNAL_SIZE_T is the word-size used for internal bookkeeping
@@ -1951,6 +1956,14 @@ typedef struct malloc_chunk* mbinptr;
#define unlink(P, BK, FD) { \
FD = P->fd; \
BK = P->bk; \
+ /* owl-malloc-unlink-sanity-check */ \
+ if (FD->bk != P || BK->fd != P) \
+ { \
+ ABORT_INSTRUCTION; \
+ _exit(127); \
+ while (1) \
+ ABORT_INSTRUCTION; \
+ } \
FD->bk = BK; \
BK->fd = FD; \
}

View File

@ -1,53 +0,0 @@
--- glibc-2.3.2.orig/debug/catchsegv.sh 2004-10-05 01:25:30.683814576 -0400
+++ glibc-2.3.2/debug/catchsegv.sh 2004-10-05 01:26:57.567606232 -0400
@@ -49,9 +49,7 @@
esac
fi
-segv_output=`basename "$prog"`.segv.$$
-# Make sure this output file does not exist.
-rm -f "$segv_output"
+segv_output=`mktemp \`basename "$prog".segv.XXXXXX\`` || exit 1
# Redirect stderr to avoid termination message from shell.
(exec 3>&2 2>/dev/null
@@ -64,7 +62,7 @@
# Check for output. Even if the program terminated correctly it might
# be that a minor process (clone) failed. Therefore we do not check the
# exit code.
-if test -f "$segv_output"; then
+if test -s "$segv_output"; then
# The program caught a signal. The output is in the file with the
# name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
# functions in shared objects are available, but names in the static
@@ -101,7 +99,7 @@
;;
esac
done)
- rm -f "$segv_output"
fi
+rm -f "$segv_output"
exit $exval
--- glibc-2.3.2.orig/libio/oldtmpfile.c 2004-10-05 01:25:31.045759552 -0400
+++ glibc-2.3.2/libio/oldtmpfile.c 2004-10-05 01:27:55.304828840 -0400
@@ -36,7 +36,7 @@
int fd;
FILE *f;
- if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
+ if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
return NULL;
fd = __gen_tempname (buf, __GT_FILE);
if (fd < 0)
--- glibc-2.3.2.orig/sysdeps/generic/tmpfile.c 2004-10-05 01:25:40.103382584 -0400
+++ glibc-2.3.2/sysdeps/generic/tmpfile.c 2004-10-05 01:28:55.235717960 -0400
@@ -43,7 +43,7 @@
int fd;
FILE *f;
- if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
+ if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
return NULL;
fd = __gen_tempname (buf, GEN_THIS);
if (fd < 0)

View File

@ -1,22 +0,0 @@
--- glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 18:14:37.000000000 +0100
+++ glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 23:32:16.000000000 +0100
@@ -73,16 +73,13 @@ _start:
addl $_GLOBAL_OFFSET_TABLE_, %ebx
/* Push address of our own entry points to .fini and .init. */
- leal __libc_csu_fini@GOTOFF(%ebx), %eax
- pushl %eax
- leal __libc_csu_init@GOTOFF(%ebx), %eax
- pushl %eax
+ pushl __libc_csu_fini@GOT(%ebx)
+ pushl __libc_csu_init@GOT(%ebx)
pushl %ecx /* Push second argument: argv. */
pushl %esi /* Push first argument: argc. */
- leal BP_SYM (main)@GOTOFF(%ebx), %eax
- pushl %eax
+ pushl BP_SYM (main)@GOT(%ebx)
/* Call the user's main function, and exit with its value.
But let the libc call main. */

View File

@ -1,29 +0,0 @@
--- elf/elf.h.orig 2004-01-26 12:54:15.000000000 -0500
+++ elf/elf.h 2004-01-26 12:53:23.000000000 -0500
@@ -568,6 +568,7 @@
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
#define PT_LOSUNW 0x6ffffffa
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
@@ -581,6 +582,18 @@
#define PF_X (1 << 0) /* Segment is executable */
#define PF_W (1 << 1) /* Segment is writable */
#define PF_R (1 << 2) /* Segment is readable */
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
#define PF_MASKOS 0x0ff00000 /* OS-specific */
#define PF_MASKPROC 0xf0000000 /* Processor-specific */

View File

@ -1,40 +0,0 @@
--- ./sysdeps/unix/sysv/linux/ssp.c.orig 2004-01-23 19:54:19.000000000 -0500
+++ ./sysdeps/unix/sysv/linux/ssp.c 2004-01-23 19:56:34.000000000 -0500
@@ -52,8 +52,8 @@
{
sigset_t mask;
sigfillset(&mask);
- sigdelset(&mask, SIGABRT); /* Block all signal handlers */
- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
+ sigdelset(&mask, SIGSEGV); /* Block all signal handlers */
+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGSEGV */
}
#endif
@@ -65,6 +65,7 @@
if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
/* print error message */
write (STDERR_FILENO, buf+3, len-3);
+ write (STDERR_FILENO, "()\n", 3);
#if defined(HAVE_SYSLOG)
if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
@@ -81,15 +82,15 @@
#endif
#ifdef _POSIX_SOURCE
- { /* Make sure the default handler is associated with SIGABRT */
+ { /* Make sure the default handler is associated with SIGSEGV */
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sigfillset(&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
- sigaction(SIGABRT, &sa, NULL);
- (void)kill(getpid(), SIGABRT);
+ sigaction(SIGSEGV, &sa, NULL);
+ (void)kill(getpid(), SIGSEGV);
}
#endif
_exit(127);

View File

@ -1,39 +0,0 @@
Index: sysdeps/mips/dl-machine.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
retrieving revision 1.71
diff -u -r1.71 dl-machine.h
--- sysdeps/mips/dl-machine.h 15 Apr 2004 14:08:16 -0000 1.71
+++ sysdeps/mips/dl-machine.h 30 Apr 2004 15:05:23 -0000
@@ -254,7 +255,7 @@
}
}
- INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
+ GLRO(dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
return NULL;
}
@@ -362,17 +363,17 @@
\
if (version->hash != 0) \
{ \
- value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
+ value = GLRO(dl_lookup_symbol_x)(strtab + sym->st_name, l, \
&sym, l->l_scope, version,\
- ELF_RTYPE_CLASS_PLT, 0); \
+ ELF_RTYPE_CLASS_PLT, 0,NULL); \
break; \
} \
/* Fall through. */ \
} \
case 0: \
- value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
- l->l_scope, ELF_RTYPE_CLASS_PLT, \
- DL_LOOKUP_ADD_DEPENDENCY); \
+ value = GLRO(dl_lookup_symbol_x) (strtab + sym->st_name, l, &sym, \
+ l->l_scope, NULL, ELF_RTYPE_CLASS_PLT, \
+ DL_LOOKUP_ADD_DEPENDENCY,NULL); \
} \
\
/* Currently value contains the base load address of the object \

View File

@ -1,252 +0,0 @@
--- ./sysdeps/mips/bits/setjmp.h.orig 2003-12-12 02:59:09.000000000 +0100
+++ ./sysdeps/mips/bits/setjmp.h 2003-12-12 03:28:17.000000000 +0100
@@ -22,6 +22,8 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
+#include <sgidefs.h>
+
typedef struct
{
#if _MIPS_SIM == _MIPS_SIM_ABI32
--- ./sysdeps/mips/mips64/setjmp.S.orig 2003-12-12 03:48:28.000000000 +0100
+++ ./sysdeps/mips/mips64/setjmp.S 2003-12-12 03:48:19.000000000 +0100
@@ -17,6 +17,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <sgidefs.h>
#include <sys/asm.h>
/* The function __sigsetjmp_aux saves all the registers, but it can't
--- ./sysdeps/mips/mips64/bsd-_setjmp.S.orig 2003-12-12 03:48:06.000000000 +0100
+++ ./sysdeps/mips/mips64/bsd-_setjmp.S 2003-12-12 03:47:56.000000000 +0100
@@ -22,6 +22,7 @@
in setjmp doesn't clobber the state restored by longjmp. */
#include <sysdep.h>
+#include <sgidefs.h>
#include <sys/asm.h>
#ifdef __PIC__
--- ./sysdeps/mips/mips64/bsd-setjmp.S.orig 2003-12-12 03:47:41.000000000 +0100
+++ ./sysdeps/mips/mips64/bsd-setjmp.S 2003-12-12 03:47:30.000000000 +0100
@@ -22,6 +22,7 @@
in setjmp doesn't clobber the state restored by longjmp. */
#include <sysdep.h>
+#include <sgidefs.h>
#include <sys/asm.h>
#ifdef PIC
--- ./sysdeps/mips/fpu/bits/mathdef.h.orig 2003-12-12 02:59:09.000000000 +0100
+++ ./sysdeps/mips/fpu/bits/mathdef.h 2003-12-12 03:26:31.000000000 +0100
@@ -21,6 +21,8 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
+#include <sgidefs.h>
+
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
--- ./sysdeps/mips/sys/regdef.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/mips/sys/regdef.h 2003-12-12 03:26:58.000000000 +0100
@@ -20,6 +20,8 @@
#ifndef _SYS_REGDEF_H
#define _SYS_REGDEF_H
+#include <sgidefs.h>
+
/*
* Symbolic register names for 32 bit ABI
*/
--- ./sysdeps/mips/sys/ucontext.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/mips/sys/ucontext.h 2003-12-12 03:29:41.000000000 +0100
@@ -23,6 +23,7 @@
#include <features.h>
#include <signal.h>
+#include <sgidefs.h>
/* Type for general register. */
#if _MIPS_SIM == _MIPS_SIM_ABI32
--- ./sysdeps/mips/elf/start.S.orig 2003-12-12 03:47:16.000000000 +0100
+++ ./sysdeps/mips/elf/start.S 2003-12-12 03:47:05.000000000 +0100
@@ -20,6 +20,7 @@
#define __ASSEMBLY__ 1
#include <entry.h>
+#include <sgidefs.h>
#include <sys/asm.h>
#ifndef ENTRY_POINT
--- ./sysdeps/mips/atomicity.h.orig 2003-12-12 03:46:51.000000000 +0100
+++ ./sysdeps/mips/atomicity.h 2003-12-12 03:46:43.000000000 +0100
@@ -21,6 +21,7 @@
#define _MIPS_ATOMICITY_H 1
#include <inttypes.h>
+#include <sgidefs.h>
static inline int
__attribute__ ((unused))
--- ./sysdeps/mips/dl-machine.h.orig 2003-12-12 03:46:33.000000000 +0100
+++ ./sysdeps/mips/dl-machine.h 2003-12-12 03:46:19.000000000 +0100
@@ -27,6 +27,7 @@
#define ELF_MACHINE_NO_PLT
#include <entry.h>
+#include <sgidefs.h>
#ifndef ENTRY_POINT
#error ENTRY_POINT needs to be defined for MIPS.
--- ./sysdeps/mips/machine-gmon.h.orig 2003-12-12 03:46:05.000000000 +0100
+++ ./sysdeps/mips/machine-gmon.h 2003-12-12 03:45:55.000000000 +0100
@@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sgidefs.h>
+
#define _MCOUNT_DECL(frompc,selfpc) \
static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
--- ./sysdeps/unix/mips/sysdep.h.orig 2003-12-12 03:45:36.000000000 +0100
+++ ./sysdeps/unix/mips/sysdep.h 2003-12-12 03:45:23.000000000 +0100
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
+#include <sgidefs.h>
#ifdef __ASSEMBLER__
--- ./sysdeps/unix/sysv/linux/mips/bits/sigcontext.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 2003-12-12 03:33:57.000000000 +0100
@@ -20,6 +20,8 @@
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
+#include <sgidefs.h>
+
#ifndef sigcontext_struct
/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
we need sigcontext. */
--- ./sysdeps/unix/sysv/linux/mips/bits/stat.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/bits/stat.h 2003-12-12 03:34:15.000000000 +0100
@@ -21,6 +21,8 @@
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
+#include <sgidefs.h>
+
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_LINUX_OLD 1
#define _STAT_VER_KERNEL 1
--- ./sysdeps/unix/sysv/linux/mips/sigaction.c.orig 2003-12-12 03:43:00.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/sigaction.c 2003-12-12 03:42:49.000000000 +0100
@@ -21,6 +21,7 @@
#include <string.h>
#include <sysdep.h>
+#include <sgidefs.h>
#include <sys/syscall.h>
#include "kernel-features.h"
--- ./sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/sys/tas.h 2003-12-12 03:36:26.000000000 +0100
@@ -21,6 +21,7 @@
#define _SYS_TAS_H 1
#include <features.h>
+#include <sgidefs.h>
__BEGIN_DECLS
--- ./sysdeps/unix/sysv/linux/mips/sys/user.h.orig 2003-12-12 02:59:10.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/sys/user.h 2003-12-12 03:36:35.000000000 +0100
@@ -19,6 +19,8 @@
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
+#include <sgidefs.h>
+
/* The whole purpose of this file is for GDB and GDB only. Don't read
too much into it. Don't use it for anything other than GDB unless
you know what you are doing. */
--- ./sysdeps/unix/sysv/linux/mips/sys/ucontext.h.orig 2003-12-12 03:45:05.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/sys/ucontext.h 2003-12-12 03:44:55.000000000 +0100
@@ -22,6 +22,7 @@
#define _SYS_UCONTEXT_H 1
#include <features.h>
+#include <sgidefs.h>
#include <signal.h>
/* We need the signal context definitions even if they are not used
--- ./sysdeps/unix/sysv/linux/mips/kernel_stat.h.orig 2003-12-12 03:44:37.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/kernel_stat.h 2003-12-12 03:44:22.000000000 +0100
@@ -1,6 +1,9 @@
/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
userland data structures are not identical, because of different
padding. */
+
+#include <sgidefs.h>
+
/* Definition of `struct stat' used in the kernel. */
#if _MIPS_SIM != _MIPS_SIM_ABI32
struct kernel_stat
--- ./sysdeps/unix/sysv/linux/mips/configure.orig 2003-12-12 03:51:49.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/configure 2003-12-12 03:49:46.000000000 +0100
@@ -41,7 +41,7 @@ echo "$as_me: WARNING: *** asm/unistd.h
name = $2;
sub (/_O32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "#if defined _ABIO32 && _MIPS_SIM == _ABIO32";
print "# define " name " " $2;
print "#endif";
next;
--- ./sysdeps/unix/sysv/linux/mips/configure.in.orig 2003-12-12 03:51:35.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/configure.in 2003-12-12 03:49:38.000000000 +0100
@@ -41,7 +41,7 @@ mips*64*)
name = $2;
sub (/_O32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "#if defined _ABIO32 && _MIPS_SIM == _ABIO32";
print "# define " name " " $2;
print "#endif";
next;
--- ./sysdeps/unix/sysv/linux/mips/sigcontextinfo.h.orig 2003-12-12 03:43:32.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 2003-12-12 03:43:16.000000000 +0100
@@ -17,6 +17,8 @@
02111-1307 USA. */
+#include <sgidefs.h>
+
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define SIGCONTEXT unsigned long _code, struct sigcontext *
--- ./linuxthreads/sysdeps/mips/pspinlock.c.orig 2003-12-12 02:59:09.000000000 +0100
+++ ./linuxthreads/sysdeps/mips/pspinlock.c 2003-12-12 03:59:27.000000000 +0100
@@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
+#include <sgidefs.h>
#include <sys/tas.h>
#include "internals.h"
--- ./linuxthreads/sysdeps/mips/pt-machine.h.orig 2003-12-12 02:59:09.000000000 +0100
+++ ./linuxthreads/sysdeps/mips/pt-machine.h 2003-12-12 03:59:26.000000000 +0100
@@ -24,6 +24,7 @@
#ifndef _PT_MACHINE_H
#define _PT_MACHINE_H 1
+#include <sgidefs.h>
#include <sys/tas.h>
#ifndef PT_EI

View File

@ -1,166 +0,0 @@
/*
* Distributed under the terms of the GNU General Public License v2
* $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.3/ssp.c,v 1.3 2004/08/07 17:53:20 solar Exp $
*
* This is a modified version of Hiroaki Etoh's stack smashing routines
* implemented for glibc.
*
* The following people have contributed input to this code.
* Ned Ludd - <solar[@]gentoo.org>
* Alexander Gabert - <pappy[@]gentoo.org>
* The PaX Team - <pageexec[@]freemail.hu>
* Peter S. Mazinger - <ps.m[@]gmx.net>
* Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
* Robert Connolly - <robert[@]linuxfromscratch.org>
* Cory Visi <cory@visi.name>
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/syslog.h>
#include <sys/time.h>
#include <sys/sysctl.h>
#ifndef _PATH_LOG
#define _PATH_LOG "/dev/log"
#endif
#ifdef __PROPOLICE_BLOCK_SEGV__
#define SSP_SIGTYPE SIGSEGV
#elif __PROPOLICE_BLOCK_KILL__
#define SSP_SIGTYPE SIGKILL
#else
#define SSP_SIGTYPE SIGABRT
#endif
unsigned long __guard = 0UL;
void
__guard_setup (void)
{
size_t size;
#ifdef HAVE_DEV_ERANDOM
int mib[3];
#endif
if (__guard != 0UL)
return;
#ifndef __SSP_QUICK_CANARY__
#ifdef HAVE_DEV_ERANDOM
/* Random is another depth in Linux, hence an array of 3. */
mib[0] = CTL_KERN;
mib[1] = KERN_RANDOM;
mib[2] = RANDOM_ERANDOM;
size = sizeof (unsigned long);
if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
if (__guard != 0UL)
return;
#endif
/*
* Attempt to open kernel pseudo random device if one exists before
* opening urandom to avoid system entropy depletion.
*/
{
int fd;
#ifdef HAVE_DEV_ERANDOM
if ((fd = open ("/dev/erandom", O_RDONLY)) == (-1))
#endif
fd = open ("/dev/urandom", O_RDONLY);
if (fd != (-1))
{
size = read (fd, (char *) &__guard, sizeof (__guard));
close (fd);
if (size == sizeof (__guard))
return;
}
}
#endif
/* If sysctl was unsuccessful, use the "terminator canary". */
__guard = 0xFF0A0D00UL;
{
/* Everything failed? Or we are using a weakened model of the
* terminator canary */
struct timeval tv;
gettimeofday (&tv, NULL);
__guard ^= tv.tv_usec ^ tv.tv_sec;
}
}
void
__stack_smash_handler (char func[], int damaged)
{
struct sigaction sa;
const char message[] = ": stack smashing attack in function ";
int bufsz, len;
char buf[512];
#ifndef __dietlibc__
struct sockaddr_un sock; /* AF_UNIX address of local logger */
int log;
extern char *__progname;
#else
static char *__progname = "dietapp";
#endif
sigset_t mask;
sigfillset (&mask);
sigdelset (&mask, SSP_SIGTYPE); /* Block all signal handlers */
sigprocmask (SIG_BLOCK, &mask, NULL); /* except SIGABRT */
bufsz = sizeof (buf);
strcpy (buf, "<2>");
len = 3;
strncat (buf, __progname, sizeof (buf) - 4);
len = strlen (buf);
if (bufsz > len)
{
strncat (buf, message, bufsz - len - 1);
len = strlen (buf);
}
if (bufsz > len)
{
strncat (buf, func, bufsz - len - 1);
len = strlen (buf);
}
/* print error message */
write (STDERR_FILENO, buf + 3, len - 3);
write (STDERR_FILENO, "()\n", 3);
#ifndef __dietlibc__
if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
{
/* Send "found" message to the "/dev/log" path */
sock.sun_family = AF_UNIX;
(void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
}
#endif
/* Make sure the default handler is associated with the our signal handler */
memset (&sa, 0, sizeof (struct sigaction));
sigfillset (&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigaction (SSP_SIGTYPE, &sa, NULL);
(void) kill (getpid (), SSP_SIGTYPE);
_exit (127);
}

View File

@ -1,460 +0,0 @@
--- resolv/res_hconf.c
+++ resolv/res_hconf.c 2004/09/21 12:56:54
@@ -59,6 +59,7 @@
#define ENV_TRIM_ADD "RESOLV_ADD_TRIM_DOMAINS"
#define ENV_MULTI "RESOLV_MULTI"
#define ENV_REORDER "RESOLV_REORDER"
+#define ENV_MDNS "RESOLV_MDNS"
static const char *arg_service_list (const char *, int, const char *,
unsigned int);
@@ -81,7 +82,8 @@
{"multi", arg_bool, HCONF_FLAG_MULTI},
{"nospoof", arg_bool, HCONF_FLAG_SPOOF},
{"spoofalert", arg_bool, HCONF_FLAG_SPOOFALERT},
- {"reorder", arg_bool, HCONF_FLAG_REORDER}
+ {"reorder", arg_bool, HCONF_FLAG_REORDER},
+ {"mdns", arg_bool, HCONF_FLAG_MDNS}
};
/* Structure containing the state. */
@@ -431,6 +433,9 @@
memset (&_res_hconf, '\0', sizeof (_res_hconf));
+ /* Default for mdns is "on". */
+ _res_hconf.flags |= HCONF_FLAG_MDNS;
+
hconf_name = getenv (ENV_HOSTCONF);
if (hconf_name == NULL)
hconf_name = _PATH_HOSTCONF;
@@ -483,6 +488,10 @@
arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0);
}
+ envval = getenv (ENV_MDNS);
+ if (envval)
+ arg_bool (ENV_MDNS, 1, envval, HCONF_FLAG_MDNS);
+
_res_hconf.initialized = 1;
}
--- resolv/res_hconf.h
+++ resolv/res_hconf.h 2004/09/21 12:56:54
@@ -44,6 +44,7 @@
# define HCONF_FLAG_SPOOFALERT (1 << 2) /* syslog warning of spoofed */
# define HCONF_FLAG_REORDER (1 << 3) /* list best address first */
# define HCONF_FLAG_MULTI (1 << 4) /* see comments for gethtbyname() */
+# define HCONF_FLAG_MDNS (1 << 5) /* Disable MDNS support */
};
extern struct hconf _res_hconf;
--- resolv/res_query.c
+++ resolv/res_query.c 2004/09/21 12:57:59
@@ -82,6 +82,8 @@
#include <stdlib.h>
#include <string.h>
+#include "res_hconf.h"
+
/* Options. Leave them on. */
/* #undef DEBUG */
@@ -278,6 +280,13 @@
*domain && !done;
domain++) {
+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0) {
+ /* don't add "local" domain if query contains a dot */
+ if (dots && (!__strcasecmp(*domain, "local") ||
+ !__strcasecmp(*domain, "local.")))
+ continue;
+ }
+
if (domain[0][0] == '\0' ||
(domain[0][0] == '.' && domain[0][1] == '\0'))
root_on_list++;
--- resolv/res_send.c
+++ resolv/res_send.c 2004/09/21 12:58:14
@@ -86,6 +86,9 @@
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
+#if defined(_LIBC) && defined(linux)
+#include <net/if.h>
+#endif
#include <errno.h>
#include <netdb.h>
@@ -96,6 +99,8 @@
#include <string.h>
#include <unistd.h>
+#include "res_hconf.h"
+
#if PACKETSZ > 65536
#define MAXPACKET PACKETSZ
#else
@@ -188,6 +193,9 @@
static int send_dg(res_state, const u_char *, int,
u_char **, int *, int *, int,
int *, int *, u_char **);
+static int send_dg_mdns(res_state, const u_char *, int,
+ u_char **, int *, int *, struct sockaddr_in6 *,
+ int *, int *, u_char **);
#ifdef DEBUG
static void Aerror(const res_state, FILE *, const char *, int,
const struct sockaddr *);
@@ -366,6 +374,35 @@
u_char *ans, int anssiz, u_char **ansp)
{
int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
+ int usemdns;
+ HEADER *qhp = (HEADER *) buf;
+
+ usemdns = 0;
+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0 &&
+ qhp->qr == 0 && qhp->opcode == QUERY && qhp->qdcount == htons(1)) {
+ /* got one simple query */
+ const u_char *bp, *be;
+ be = buf + buflen;
+ for (bp = buf + NS_HFIXEDSZ; bp < be; )
+ if ((*bp & NS_CMPRSFLGS) != 0)
+ break;
+ else if (*bp) {
+ if (*bp == 5 && !strncasecmp(bp, "\005local\000", 7)) {
+ usemdns = 1;
+ break;
+ }
+ if (*bp == 3 && !strncasecmp(bp, "\003254\003169\007in-addr\004arpa\000", 22)) {
+ usemdns = 1;
+ break;
+ }
+ if (*bp == 1 && !strncasecmp(bp, "\0010\0018\001e\001f\003ip6\004arpa\000", 18)) {
+ usemdns = 2;
+ break;
+ }
+ bp += *bp + 1;
+ } else
+ break;
+ }
if (statp->nscount == 0) {
__set_errno (ESRCH);
@@ -524,13 +561,28 @@
*/
for (try = 0; try < statp->retry; try++) {
#ifdef _LIBC
- for (ns = 0; ns < MAXNS; ns++)
+ for (ns = 0; ns < (usemdns ? 1 : MAXNS); ns++)
#else
for (ns = 0; ns < statp->nscount; ns++)
#endif
{
#ifdef _LIBC
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
+ if (usemdns == 1) {
+ static struct sockaddr_in mdns4;
+ mdns4.sin_family = AF_INET;
+ mdns4.sin_port = htons(5353);
+ mdns4.sin_addr.s_addr = htonl(0xe00000fb);
+ nsap = (struct sockaddr_in6 *)&mdns4;
+ }
+ if (usemdns == 2) {
+ static struct sockaddr_in6 mdns6;
+ mdns6.sin6_family = AF_INET6;
+ mdns6.sin6_port = htons(5353);
+ mdns6.sin6_addr.s6_addr32[0] = htonl(0xff020000);
+ mdns6.sin6_addr.s6_addr32[3] = htonl(0x000000fb);
+ nsap = &mdns6;
+ }
if (nsap == NULL)
goto next_ns;
@@ -602,8 +654,11 @@
resplen = n;
} else {
/* Use datagrams. */
- n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
- ns, &v_circuit, &gotsomewhere, ansp);
+ if (usemdns)
+ n = send_dg_mdns(statp, buf, buflen, &ans, &anssiz, &terrno, nsap, &v_circuit, &gotsomewhere, ansp);
+ else
+ n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
+ ns, &v_circuit, &gotsomewhere, ansp);
if (n < 0)
return (-1);
if (n == 0)
@@ -675,8 +730,15 @@
if (!v_circuit) {
if (!gotsomewhere)
__set_errno (ECONNREFUSED); /* no nameservers found */
- else
+ else if (!usemdns) {
__set_errno (ETIMEDOUT); /* no answer obtained */
+ } else {
+ /* treat timeout as host not found */
+ HEADER *anhp = (HEADER *) ans;
+ memset(ans, 0, HFIXEDSZ);
+ anhp->rcode = NXDOMAIN;
+ return HFIXEDSZ;
+ }
} else
__set_errno (terrno);
return (-1);
@@ -1140,6 +1202,255 @@
return (resplen);
}
+static int
+send_dg_mdns(res_state statp,
+ const u_char *buf, int buflen, u_char **ansp, int *anssizp,
+ int *terrno, struct sockaddr_in6 *nsap, int *v_circuit, int *gotsomewhere, u_char **anscp)
+{
+ const HEADER *hp = (HEADER *) buf;
+ u_char *ans = *ansp;
+ int anssiz = *anssizp;
+ HEADER *anhp = (HEADER *) ans;
+ struct timespec now, timeout, finish;
+ struct pollfd pfd[32];
+ int ptimeout;
+ int fromlen, resplen, seconds, n, s;
+ int on = 1;
+ struct msghdr mhdr;
+ struct iovec iov;
+ u_char cmsgbuf[CMSG_SPACE(sizeof(int))];
+ struct cmsghdr *cmsg;
+ int ttl;
+ struct ifconf ifconf;
+ struct ifreq ifreq[64];
+ int ifreqn;
+ int i, j;
+ int ifidx[32], ifidxn;
+ struct ip_mreqn mreqn;
+
+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
+ if (s < 0) {
+ *terrno = errno;
+ Perror(statp, stderr, "socket(dg)", errno);
+ return (-1);
+ }
+ ifconf.ifc_len = sizeof(ifreq);
+ ifconf.ifc_req = ifreq;
+ ifidxn = 0;
+ if (ioctl(s, SIOCGIFCONF, &ifconf) == 0) {
+ ifreqn = ifconf.ifc_len / sizeof(*ifreq);
+ for (i = 0 ; i < ifreqn; i++) {
+ if (ioctl(s, SIOCGIFFLAGS, ifreq + i))
+ continue;
+ if (!(ifreq[i].ifr_flags & IFF_MULTICAST))
+ continue;
+ if (ioctl(s, SIOCGIFINDEX, ifreq + i))
+ continue;
+ for (j = 0; j < ifidxn; j++)
+ if (ifidx[j] == ifreq[i].ifr_ifindex)
+ break;
+ if (j < ifidxn)
+ continue;
+ ifidx[ifidxn++] = ifreq[i].ifr_ifindex;
+ if (ifidxn == sizeof(ifidx)/sizeof(*ifidx))
+ break;
+ }
+ }
+ j = 0;
+ for (i = 0; i < (ifidxn ? ifidxn : 1); i++) {
+ if (i) {
+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
+ if (!s)
+ continue;
+ }
+ if (setsockopt(s, SOL_IP, IP_RECVTTL, &on, sizeof(on))) {
+ *terrno = errno;
+ Perror(statp, stderr, "IP_RECVTTL(dg)", errno);
+ close(s);
+ continue;
+ }
+ if (ifidxn) {
+ memset(&mreqn, 0, sizeof(mreqn));
+ mreqn.imr_ifindex = ifidx[i];
+ if (setsockopt(s, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn))) {
+ *terrno = errno;
+ Perror(statp, stderr, "IP_MULTICAST_IF", errno);
+ close(s);
+ continue;
+ }
+ }
+ if (sendto(s, (char*)buf, buflen, 0,
+ (struct sockaddr *)nsap, sizeof *nsap) != buflen) {
+ Aerror(statp, stderr, "sendto", errno, *(struct sockaddr_in *)nsap);
+ close(s);
+ continue;
+ }
+ pfd[j].fd = s;
+ pfd[j].events = POLLIN;
+ j++;
+ }
+ /*
+ * Wait for reply.
+ */
+ seconds = statp->retrans;
+ if (seconds <= 0)
+ seconds = 1;
+ evNowTime(&now);
+ evConsTime(&timeout, seconds, 0);
+ evAddTime(&finish, &now, &timeout);
+ wait:
+ if (j == 0) {
+ return (0);
+ }
+
+ /* Convert struct timespec in milliseconds. */
+ ptimeout = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000;
+ n = __poll (pfd, j, ptimeout);
+ if (n == 0) {
+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
+ *gotsomewhere = 1;
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+ return (0);
+ }
+ if (n < 0) {
+ if (errno == EINTR) {
+ evNowTime(&now);
+ if (evCmpTime(finish, now) > 0) {
+ evSubTime(&timeout, &finish, &now);
+ goto wait;
+ }
+ }
+ Perror(statp, stderr, "select", errno);
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+ res_nclose(statp);
+ return (0);
+ }
+ for (i = 0; i < j - 1; i++)
+ if (pfd[j].revents == POLLIN)
+ break;
+ s = pfd[i].fd;
+ __set_errno (0);
+ fromlen = sizeof(struct sockaddr_in6);
+ if (anssiz < MAXPACKET
+ && anscp
+ && (ioctl (s, FIONREAD, &resplen) < 0
+ || anssiz < resplen)) {
+ ans = malloc (MAXPACKET);
+ if (ans == NULL)
+ ans = *ansp;
+ else {
+ anssiz = MAXPACKET;
+ *anssizp = MAXPACKET;
+ *ansp = ans;
+ *anscp = ans;
+ anhp = (HEADER *) ans;
+ }
+ }
+ iov.iov_base = ans;
+ iov.iov_len = anssiz;
+ mhdr.msg_name = 0;
+ mhdr.msg_namelen = 0;
+ mhdr.msg_iov = &iov;
+ mhdr.msg_iovlen = 1;
+ mhdr.msg_control = cmsgbuf;
+ mhdr.msg_controllen = sizeof(cmsgbuf);
+ mhdr.msg_flags = 0;
+ resplen = recvmsg(s, &mhdr, 0);
+ if (resplen <= 0) {
+ if (errno == EAGAIN)
+ goto wait;
+ Perror(statp, stderr, "recvfrom", errno);
+wait2:
+ close(s);
+ if (i < j)
+ memmove(pfd + i, pfd + i + 1, sizeof(*pfd) * (j - i));
+ j--;
+ goto wait;
+ }
+ cmsg = CMSG_FIRSTHDR(&mhdr);
+ for (cmsg = CMSG_FIRSTHDR(&mhdr); cmsg; CMSG_NXTHDR(&mhdr, cmsg))
+ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_TTL)
+ break;
+ if (!cmsg) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; no TTL found\n"));
+ goto wait2;
+ }
+ ttl = *(int *)CMSG_DATA(cmsg);
+ if (ttl != 255) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; answer with bad TTL: %d \n", ttl));
+ goto wait;
+ }
+ *gotsomewhere = 1;
+ if (resplen < HFIXEDSZ) {
+ /*
+ * Undersized message.
+ */
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; undersized: %d\n",
+ resplen));
+ *terrno = EMSGSIZE;
+ goto wait;
+ }
+ if (hp->id != anhp->id) {
+ /*
+ * response from old query, ignore it.
+ * XXX - potential security hazard could
+ * be detected here.
+ */
+ DprintQ((statp->options & RES_DEBUG) ||
+ (statp->pfcode & RES_PRF_REPLY),
+ (stdout, ";; old answer:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ if (!(statp->options & RES_INSECURE2) &&
+ !res_queriesmatch(buf, buf + buflen,
+ ans, ans + anssiz)) {
+ /*
+ * response contains wrong query? ignore it.
+ * XXX - potential security hazard could
+ * be detected here.
+ */
+ DprintQ((statp->options & RES_DEBUG) ||
+ (statp->pfcode & RES_PRF_REPLY),
+ (stdout, ";; wrong query name:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ if (anhp->rcode == SERVFAIL ||
+ anhp->rcode == NOTIMP ||
+ anhp->rcode == REFUSED) {
+ DprintQ(statp->options & RES_DEBUG,
+ (stdout, "server rejected query:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+#if 0
+ if (!(statp->options & RES_IGNTC) && anhp->tc) {
+ /*
+ * To get the rest of answer,
+ * use TCP with same server.
+ */
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; truncated answer\n"));
+ *v_circuit = 1;
+ res_nclose(statp);
+ return (1);
+ }
+#endif
+ /*
+ * All is well, or the error is fatal. Signal that the
+ * next nameserver ought not be tried.
+ */
+ return (resplen);
+}
+
#ifdef DEBUG
static void
Aerror(const res_state statp, FILE *file, const char *string, int error,

View File

@ -1,81 +0,0 @@
#
# Submitted:
#
# Robert Schwebel, 2004-01-31 (patch by RSC & Dan Kegel)
#
# Error:
#
# arm-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/arm/ioperm.c -c
# -std=gnu99 -O -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g0
# -O99 -fomit-frame-pointer -D__USE_STRING_INLINES -I../include -I.
# -I/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/mis c -I.. -I../libio
# -I/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build -I../sysdeps/arm/elf
# -I../linuxthreads/sysdeps/unix/sysv/linu x/arm
# -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
# -I../sysdeps/pthread -I../linuxthreads/sysdeps/uni x/sysv
# -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/arm
# -I../sysdeps/unix/sysv/linux/arm -I../sysdeps/unix/sysv/linux
# -I ../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
# -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm
# -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm -I../sysdeps/wordsize-32
# -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-6 4 -I../sysdeps/ieee754 -I../sysdeps/generic/elf
# -I../sysdeps/generic -nostdinc -isystem
# /opt/ptxdist/arm-linux-3.3.2/lib/gcc-lib/arm-unknown-linux-gnu/3.3.2/include -isystem
# /opt/ptxdist/arm-linux-3.3.2/arm-unknown-linux-gnu/include -D_LIBC_REENTRANT -include
# ../include/libc-symbols.h -o /ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/misc/ioperm.o
# ../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
# ../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
# make[3]: *** [/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/misc/ioperm.o] Error 1
#
#
# Description:
#
# Kernel headers have changed to avoid confusion with BUS_ISA in input.h.
#
# State:
#
# Kernels > 2.4.24 and > 2.6 have a CTL_BUS_ISA definition. Older kernels should not be used anyway :-)
#
diff -urN glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c glibc-2.3.2-ptx/sysdeps/unix/sysv/linux/arm/ioperm.c
--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-02-02 07:37:24.000000000 +0100
+++ glibc-2.3.2-ptx/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-02-02 08:15:06.000000000 +0100
@@ -47,6 +47,12 @@
#include <asm/page.h>
#include <sys/sysctl.h>
+/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
+#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
+#endif
+
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
#define PATH_CPUINFO "/proc/cpuinfo"
@@ -80,7 +86,7 @@
* Initialize I/O system. There are several ways to get the information
* we need. Each is tried in turn until one succeeds.
*
- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
* but not all kernels support it.
*
* 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
@@ -100,8 +106,8 @@
{
char systype[256];
int i, n;
- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)

View File

@ -1,50 +0,0 @@
diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c
--- glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c 2004-09-24 01:40:02.663710000 -0400
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c 2004-09-24 01:54:55.883919888 -0400
@@ -56,11 +56,17 @@
__stack_prot) == 0, 1))
goto return_success;
# if __ASSUME_PROT_GROWSUPDOWN == 0
- if (errno == EINVAL)
+ if (errno == EINVAL) {
no_growsupdown = true;
- else
+ } else {
+# endif
+ if (errno == EACCES) /* PAX is enabled */
+ return 0;
+ else
+ return errno;
+# if __ASSUME_PROT_GROWSUPDOWN == 0
+ }
# endif
- return errno;
}
#endif
@@ -84,8 +90,11 @@
page -= size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GLRO(dl_pagesize))
/* We just tried to mprotect the top hole page and failed.
@@ -107,8 +116,11 @@
page += size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) { /* PAX is enabled */
+ return 0;
+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
return errno;
+ }
if (size == GLRO(dl_pagesize))
/* We just tried to mprotect the lowest hole page and failed.

View File

@ -1,11 +0,0 @@
--- include/features.h.orig 2004-11-04 15:42:23.777521424 -0500
+++ include/features.h 2004-11-04 15:43:16.734470744 -0500
@@ -262,7 +262,7 @@
# define __USE_REENTRANT 1
#endif
-#if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ > 0 \
+#if (_FORTIFY_SOURCE > 0) && defined(__OPTIMIZE__) \
&& (__GNUC_PREREQ (4, 1) \
|| (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
|| (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \

View File

@ -1,57 +0,0 @@
--- glibc-2.3.3.old/elf/rtld.c 2004-10-26 21:41:41.989117872 -0400
+++ glibc-2.3.3/elf/rtld.c 2004-10-26 21:45:15.015732904 -0400
@@ -1087,53 +1087,6 @@
++GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
++GL(dl_load_adds);
-#if defined(__i386__)
- /* Force non-TLS libraries for glibc 2.0 binaries
- or if a buggy binary references non-TLS errno or h_errno. */
- if (__builtin_expect (main_map->l_info[DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGIDX (DT_VERNEED)]
- == NULL, 0)
- && main_map->l_info[DT_DEBUG])
- GLRO(dl_osversion) = 0x20205;
- else if ((__builtin_expect (mode, normal) != normal
- || main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)] == NULL)
- /* Only binaries have DT_DEBUG dynamic tags... */
- && main_map->l_info[DT_DEBUG])
- {
- /* Workaround for buggy binaries. This doesn't handle buggy
- libraries. */
- bool buggy = false;
- const ElfW(Sym) *symtab = (const void *) D_PTR (main_map,
- l_info[DT_SYMTAB]);
- const char *strtab = (const void *) D_PTR (main_map,
- l_info[DT_STRTAB]);
- Elf_Symndx symidx;
- for (symidx = main_map->l_buckets[0x6c994f % main_map->l_nbuckets];
- symidx != STN_UNDEF;
- symidx = main_map->l_chain[symidx])
- {
- if (__builtin_expect (strcmp (strtab + symtab[symidx].st_name,
- "errno") == 0, 0)
- && ELFW(ST_TYPE) (symtab[symidx].st_info) != STT_TLS)
- buggy = true;
- }
- for (symidx = main_map->l_buckets[0xe5c992f % main_map->l_nbuckets];
- symidx != STN_UNDEF;
- symidx = main_map->l_chain[symidx])
- {
- if (__builtin_expect (strcmp (strtab + symtab[symidx].st_name,
- "h_errno") == 0, 0)
- && ELFW(ST_TYPE) (symtab[symidx].st_info) != STT_TLS)
- buggy = true;
- }
- if (__builtin_expect (buggy, false) && GLRO(dl_osversion) > 0x20401)
- {
- GLRO(dl_osversion) = 0x20401;
- _dl_error_printf ("Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.\n");
- }
- }
-#endif
-
/* If LD_USE_LOAD_BIAS env variable has not been seen, default
to not using bias for non-prelinked PIEs and libraries
and using it for executables or prelinked PIEs or libraries. */

View File

@ -1,70 +0,0 @@
--- glibc-2.3.3.old/elf/rtld.c 2004-10-26 21:41:41.989117872 -0400
+++ glibc-2.3.3/elf/rtld.c 2004-10-26 21:45:15.015732904 -0400
@@ -1306,67 +1259,6 @@
}
}
-
-#if defined(__i386__) || defined(__alpha__) || (defined(__sparc__) && !defined(__arch64__))
- /*
- * Modifications by Red Hat Software
- *
- * Deal with the broken binaries from the non-versioned ages of glibc.
- * If a binary does not have version information enabled, we assume that
- * it is a glibc 2.0 binary and we load a compatibility library to try to
- * overcome binary incompatibilities.
- * Blame: gafton@redhat.com
- */
-#define LIB_NOVERSION "/lib/libNoVersion.so.1"
-
- if (__builtin_expect (main_map->l_info[DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGIDX (DT_VERNEED)]
- == NULL, 0)
- && (main_map->l_info[DT_DEBUG]
- || !(GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)))
- {
- struct stat test_st;
- int test_fd;
- int can_load;
-
- HP_TIMING_NOW (start);
-
-/* _dl_sysdep_message("Loading compatibility library... ", NULL); */
-
- can_load = 1;
- test_fd = __open (LIB_NOVERSION, O_RDONLY);
- if (test_fd < 0) {
- can_load = 0;
-/* _dl_sysdep_message(" Can't find " LIB_NOVERSION "\n", NULL); */
- } else {
- if (__fxstat (_STAT_VER, test_fd, &test_st) < 0 || test_st.st_size == 0) {
- can_load = 0;
-/* _dl_sysdep_message(" Can't stat " LIB_NOVERSION "\n", NULL); */
- }
- }
-
- if (test_fd >= 0) /* open did no fail.. */
- __close(test_fd); /* avoid fd leaks */
-
- if (can_load != 0) {
- struct link_map *new_map;
- new_map = _dl_map_object (main_map, LIB_NOVERSION,
- 1, lt_library, 0, 0, LM_ID_BASE);
- if (++new_map->l_opencount == 1) {
- /* It is no duplicate. */
- ++npreloads;
-/* _dl_sysdep_message(" DONE\n", NULL); */
- } else {
-/* _dl_sysdep_message(" FAILED\n", NULL); */
- }
- }
-
- HP_TIMING_NOW (stop);
- HP_TIMING_DIFF (diff, start, stop);
- HP_TIMING_ACCUM_NT (load_time, diff);
- }
-#endif
-
if (__builtin_expect (npreloads, 0) != 0)
{
/* Set up PRELOADS with a vector of the preloaded libraries. */

View File

@ -1,11 +0,0 @@
--- malloc/malloc.c.fedora 2004-11-04 16:45:51.365618552 -0500
+++ malloc/malloc.c 2004-11-04 16:46:43.132748752 -0500
@@ -2355,7 +2355,7 @@
/* ---------------- Error behavior ------------------------------------ */
#ifndef DEFAULT_CHECK_ACTION
-#define DEFAULT_CHECK_ACTION 3
+#define DEFAULT_CHECK_ACTION 0
#endif
static int check_action = DEFAULT_CHECK_ACTION;

View File

@ -1,268 +0,0 @@
Gentoo bug #52374.
==================
Note, this patch includes both:
-----
2005-01-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and
recognition of last entry.
-----
and:
-----
2005-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ#786]
* sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle
GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx).
* elf/Makefile: Add rules to build and run tst-tls15.
* elf/tst-tls15.c: New test.
* elf/tst-tlsmod15a.c: New file.
* elf/tst-tlsmod15b.c: New file.
-----
================================================================================
On Sun, Mar 13, 2005 at 09:39:04PM +0200, Martin Schlemmer wrote:
> Basically the issue above. This is valid for glibc 2.3.[234] if I did
> not miss anything. Here is a good test case:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=219352#msg122
>
> I came up with attached patch that seems to work and passes all the
> tests (except for the one or two usual ones). Is this the correct fix,
> or are the problem deeper?
>
>--- glibc-2.3.4/sysdeps/generic/dl-tls.c.az 2005-03-13 19:26:55.000000000 +0200
>+++ glibc-2.3.4/sysdeps/generic/dl-tls.c 2005-03-13 19:29:14.000000000 +0200
>@@ -69,7 +69,10 @@
> result = GL(dl_tls_static_nelem) + 1;
> /* If the following would not be true we mustn't have assumed
> there is a gap. */
>- assert (result <= GL(dl_tls_max_dtv_idx));
>+ /* The +1 is needed, as we add +1 above, but dl_tls_static_nelem
>+ is only once set as far as I can see in dl_main (elf/rtld.c),
>+ and that is equal to dl_tls_max_dtv_idx ... */
>+ assert (result <= (GL(dl_tls_max_dtv_idx) + 1));
> do
> {
> while (result - disp < runp->len)
>@@ -92,7 +95,8 @@
> {
> /* The new index must indeed be exactly one higher than the
> previous high. */
>- assert (result == GL(dl_tls_max_dtv_idx));
>+ /* Once again +1 for the same reasons as above ... */
>+ assert (result == (GL(dl_tls_max_dtv_idx) + 1));
>
> /* There is no gap anymore. */
> GL(dl_tls_dtv_gaps) = false;
>
That patch certainly doesn't apply to neither HEAD nor glibc-2_3-branch,
see especially:
2005-01-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and
recognition of last entry.
The fix can either be that dl-open.c only sets GL(dl_tls_dtv_gaps)
to true if GL(dl_tls_static_nelem) < GL(dl_tls_max_dtv_idx)
(if it is equal, there are certainly no gaps), or handling that case
in _dl_next_tls_modid. In _dl_next_tls_modid, the choices are either
to do what the patch below does, i.e. just clear GL(dl_tls_dtv_gaps)
if that happens, or just change the assert and let the do ... while
loop run, it shouldn't increment result anyway.
2005-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ#786]
* sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle
GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx).
* elf/Makefile: Add rules to build and run tst-tls15.
* elf/tst-tls15.c: New test.
* elf/tst-tlsmod15a.c: New file.
* elf/tst-tlsmod15b.c: New file.
diff -urpN glibc-2.3.4.az/elf/Makefile glibc-2.3.4/elf/Makefile
--- glibc-2.3.4.az/elf/Makefile 2005-03-15 17:38:36.000000000 +0200
+++ glibc-2.3.4/elf/Makefile 2005-03-15 17:39:07.000000000 +0200
@@ -152,7 +152,7 @@ tests += loadtest restest1 preloadtest l
neededtest3 neededtest4 unload2 lateglobal initfirst global \
restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
- tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-align \
+ tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 tst-align \
$(tests-execstack-$(have-z-execstack)) tst-dlmodcount \
tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3
# reldep9
@@ -182,6 +182,7 @@ modules-names = testobj1 testobj2 testob
tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
+ tst-tlsmod15a tst-tlsmod15b \
circlemod1 circlemod1a circlemod2 circlemod2a \
circlemod3 circlemod3a \
reldep8mod1 reldep8mod2 reldep8mod3 \
@@ -454,6 +455,7 @@ tst-tlsmod10.so-no-z-defs = yes
tst-tlsmod12.so-no-z-defs = yes
tst-tlsmod14a.so-no-z-defs = yes
tst-tlsmod14b.so-no-z-defs = yes
+tst-tlsmod15a.so-no-z-defs = yes
circlemod2.so-no-z-defs = yes
circlemod3.so-no-z-defs = yes
circlemod3a.so-no-z-defs = yes
@@ -664,8 +666,11 @@ $(objpfx)tst-tls12: $(objpfx)tst-tlsmod1
$(objpfx)tst-tls13: $(libdl)
$(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
-$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
-$(objpfx)tst-tls14.out:$(objpfx)tst-tlsmod14b.so
+$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
+$(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so
+
+$(objpfx)tst-tls15: $(libdl)
+$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so
CFLAGS-tst-align.c = $(stack-align-test-flags)
CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
diff -urpN glibc-2.3.4.az/elf/tst-tls15.c glibc-2.3.4/elf/tst-tls15.c
--- glibc-2.3.4.az/elf/tst-tls15.c 1970-01-01 02:00:00.000000000 +0200
+++ glibc-2.3.4/elf/tst-tls15.c 2005-03-15 17:39:07.000000000 +0200
@@ -0,0 +1,32 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW);
+ if (h != NULL)
+ {
+ puts ("unexpectedly succeeded to open tst-tlsmod15a.so");
+ exit (1);
+ }
+
+ h = dlopen ("tst-tlsmod15b.so", RTLD_NOW);
+ if (h == NULL)
+ {
+ puts ("failed to open tst-tlsmod15b.so");
+ exit (1);
+ }
+
+ int (*fp) (void) = (int (*) (void)) dlsym (h, "in_dso");
+ if (fp == NULL)
+ {
+ puts ("cannot find in_dso");
+ exit (1);
+ }
+
+ return fp ();
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff -urpN glibc-2.3.4.az/elf/tst-tlsmod15a.c glibc-2.3.4/elf/tst-tlsmod15a.c
--- glibc-2.3.4.az/elf/tst-tlsmod15a.c 1970-01-01 02:00:00.000000000 +0200
+++ glibc-2.3.4/elf/tst-tlsmod15a.c 2005-03-15 17:39:07.000000000 +0200
@@ -0,0 +1,6 @@
+extern int nonexistent_dummy_var;
+int *
+foo (void)
+{
+ return &nonexistent_dummy_var;
+}
diff -urpN glibc-2.3.4.az/elf/tst-tlsmod15b.c glibc-2.3.4/elf/tst-tlsmod15b.c
--- glibc-2.3.4.az/elf/tst-tlsmod15b.c 1970-01-01 02:00:00.000000000 +0200
+++ glibc-2.3.4/elf/tst-tlsmod15b.c 2005-03-15 17:39:07.000000000 +0200
@@ -0,0 +1,17 @@
+#include "tst-tls10.h"
+
+#ifdef USE_TLS__THREAD
+__thread int mod15b_var __attribute__((tls_model("initial-exec")));
+
+int
+in_dso (void)
+{
+ return mod15b_var;
+}
+#else
+int
+in_dso (void)
+{
+ return 0;
+}
+#endif
diff -urpN glibc-2.3.4.az/sysdeps/generic/dl-tls.c glibc-2.3.4/sysdeps/generic/dl-tls.c
--- glibc-2.3.4.az/sysdeps/generic/dl-tls.c 2005-03-15 17:40:56.000000000 +0200
+++ glibc-2.3.4/sysdeps/generic/dl-tls.c 2005-03-15 17:39:07.000000000 +0200
@@ -65,34 +65,35 @@ _dl_next_tls_modid (void)
/* Note that this branch will never be executed during program
start since there are no gaps at that time. Therefore it
does not matter that the dl_tls_dtv_slotinfo is not allocated
- yet when the function is called for the first times. */
- result = GL(dl_tls_static_nelem) + 1;
- /* If the following would not be true we mustn't have assumed
- there is a gap. */
- assert (result <= GL(dl_tls_max_dtv_idx));
- do
- {
- while (result - disp < runp->len)
- {
- if (runp->slotinfo[result - disp].map == NULL)
- break;
-
- ++result;
- assert (result <= GL(dl_tls_max_dtv_idx) + 1);
- }
+ yet when the function is called for the first times.
- if (result - disp < runp->len)
- break;
-
- disp += runp->len;
- }
- while ((runp = runp->next) != NULL);
+ NB: the offset +1 is due to the fact that DTV[0] is used
+ for something else. */
+ result = GL(dl_tls_static_nelem) + 1;
+ if (result <= GL(dl_tls_max_dtv_idx))
+ do
+ {
+ while (result - disp < runp->len)
+ {
+ if (runp->slotinfo[result - disp].map == NULL)
+ break;
+
+ ++result;
+ assert (result <= GL(dl_tls_max_dtv_idx) + 1);
+ }
+
+ if (result - disp < runp->len)
+ break;
+
+ disp += runp->len;
+ }
+ while ((runp = runp->next) != NULL);
- if (result >= GL(dl_tls_max_dtv_idx))
+ if (result > GL(dl_tls_max_dtv_idx))
{
/* The new index must indeed be exactly one higher than the
previous high. */
- assert (result == GL(dl_tls_max_dtv_idx));
+ assert (result == GL(dl_tls_max_dtv_idx) + 1);
/* There is no gap anymore. */
GL(dl_tls_dtv_gaps) = false;
@@ -577,7 +578,7 @@ __tls_get_addr (GET_ADDR_ARGS)
{
size_t cnt;
- for (cnt = total = 0 ? 1 : 0; cnt < listp->len; ++cnt)
+ for (cnt = total == 0 ? 1 : 0; cnt < listp->len; ++cnt)
{
size_t gen = listp->slotinfo[cnt].gen;
struct link_map *map;

View File

@ -1,358 +0,0 @@
2004-09-02 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #357]
* stdlib/tst-setcontext.c (test_stack): Added test for stack clobber.
(main): Call test_stack.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
(__getcontext): Push stack frame then save parms in local frame.
Improve instruction scheduling.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
(__swapcontext): Push stack frame then save parms in local frame.
Improve instruction scheduling.
diff -urN libc23-cvstip-20040830/stdlib/tst-setcontext.c libc23/stdlib/tst-setcontext.c
--- libc23-cvstip-20040830/stdlib/tst-setcontext.c 2002-08-30 22:21:40.000000000 -0500
+++ libc23/stdlib/tst-setcontext.c 2004-09-02 10:10:28.055274880 -0500
@@ -72,6 +72,55 @@
was_in_f2 = 1;
}
+void
+test_stack(volatile int a, volatile int b,
+ volatile int c, volatile int d)
+{
+ volatile int e = 5;
+ volatile int f = 6;
+ ucontext_t uc;
+
+ /* Test for cases where getcontext is clobbering the callers
+ stack, including parameters. */
+ getcontext(&uc);
+
+ if (a != 1)
+ {
+ printf ("%s: getcontext clobbers parm a\n", __FUNCTION__);
+ exit (1);
+ }
+
+ if (b != 2)
+ {
+ printf ("%s: getcontext clobbers parm b\n", __FUNCTION__);
+ exit (1);
+ }
+
+ if (c != 3)
+ {
+ printf ("%s: getcontext clobbers parm c\n", __FUNCTION__);
+ exit (1);
+ }
+
+ if (d != 4)
+ {
+ printf ("%s: getcontext clobbers parm d\n", __FUNCTION__);
+ exit (1);
+ }
+
+ if (e != 5)
+ {
+ printf ("%s: getcontext clobbers varible e\n", __FUNCTION__);
+ exit (1);
+ }
+
+ if (f != 6)
+ {
+ printf ("%s: getcontext clobbers variable f\n", __FUNCTION__);
+ exit (1);
+ }
+}
+
volatile int global;
int
@@ -88,6 +137,8 @@
printf ("%s: getcontext: %m\n", __FUNCTION__);
exit (1);
}
+
+ test_stack (1, 2, 3, 4);
/* Play some tricks with this context. */
if (++global == 1)
diff -urN libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
--- libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-06-15 15:02:20.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-09-02 12:46:16.064221704 -0500
@@ -27,18 +27,22 @@
.machine "altivec"
ENTRY(__getcontext)
+ stwu r1,-16(r1)
+/* Insure that the _UC_REGS start on a quadword boundary. */
stw r3,_FRAME_PARM_SAVE1(r1)
addi r3,r3,_UC_REG_SPACE+12
clrrwi r3,r3,4
+
+/* Save the general purpose registers */
stw r0,_UC_GREGS+(PT_R0*4)(r3)
mflr r0
- stw r1,_UC_GREGS+(PT_R1*4)(r3)
- stwu r1,-16(r1)
+ stw r2,_UC_GREGS+(PT_R2*4)(r3)
+ stw r4,_UC_GREGS+(PT_R4*4)(r3)
+/* Set the callers LR_SAVE, and the ucontext LR and NIP to the callers
+ return address. */
stw r0,_UC_GREGS+(PT_LNK*4)(r3)
stw r0,_UC_GREGS+(PT_NIP*4)(r3)
stw r0,_FRAME_LR_SAVE+16(r1)
- stw r2,_UC_GREGS+(PT_R2*4)(r3)
- stw r4,_UC_GREGS+(PT_R4*4)(r3)
stw r5,_UC_GREGS+(PT_R5*4)(r3)
stw r6,_UC_GREGS+(PT_R6*4)(r3)
stw r7,_UC_GREGS+(PT_R7*4)(r3)
@@ -66,23 +70,28 @@
stw r29,_UC_GREGS+(PT_R29*4)(r3)
stw r30,_UC_GREGS+(PT_R30*4)(r3)
stw r31,_UC_GREGS+(PT_R31*4)(r3)
- mfctr r0
- stw r0,_UC_GREGS+(PT_CTR*4)(r3)
- mfxer r0
- stw r0,_UC_GREGS+(PT_XER*4)(r3)
- mfcr r0
- stw r0,_UC_GREGS+(PT_CCR*4)(r3)
-
- /* Set the return value of getcontext to "success". R3 is the only
- register whose value is not preserved in the saved context. */
+/* Save the value of R1. We had to push the stack before we
+ had the address of uc_reg_space. So compute the address of
+ the callers stack pointer and save it as R1. */
+ addi r8,r1,16
li r0,0
+/* Save the count, exception and condition registers. */
+ mfctr r11
+ mfxer r10
+ mfcr r9
+ stw r8,_UC_GREGS+(PT_R1*4)(r3)
+ stw r11,_UC_GREGS+(PT_CTR*4)(r3)
+ stw r10,_UC_GREGS+(PT_XER*4)(r3)
+ stw r9,_UC_GREGS+(PT_CCR*4)(r3)
+/* Set the return value of getcontext to "success". R3 is the only
+ register whose value is not preserved in the saved context. */
stw r0,_UC_GREGS+(PT_R3*4)(r3)
- /* Zero fill fields that can't be set in user state. */
+/* Zero fill fields that can't be set in user state. */
stw r0,_UC_GREGS+(PT_MSR*4)(r3)
stw r0,_UC_GREGS+(PT_MQ*4)(r3)
- /* Save the floating-point registers */
+/* Save the floating-point registers */
stfd fp0,_UC_FREGS+(0*8)(r3)
stfd fp1,_UC_FREGS+(1*8)(r3)
stfd fp2,_UC_FREGS+(2*8)(r3)
@@ -136,21 +145,31 @@
lwz r7,_dl_hwcap@l(r7)
#endif
andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
- beq L(no_vec)
la r10,(_UC_VREGS)(r3)
la r9,(_UC_VREGS+16)(r3)
+
+ beq L(no_vec)
+/* address of the combined VSCR/VSAVE quadword. */
+ la r8,(_UC_VREGS+512)(r3)
+/* Save the vector registers */
stvx v0,0,r10
stvx v1,0,r9
addi r10,r10,32
addi r9,r9,32
+/* We need to get the Vector Status and Control Register early to avoid
+ store order problems later with the VSAVE register that shares the
+ same quadword. */
+ mfvscr v0
stvx v2,0,r10
stvx v3,0,r9
addi r10,r10,32
addi r9,r9,32
+ stvx v0,0,r8
+
stvx v4,0,r10
stvx v5,0,r9
addi r10,r10,32
@@ -216,20 +235,18 @@
addi r10,r10,32
addi r9,r9,32
+ mfspr r0,VRSAVE
stvx v30,0,r10
stvx v31,0,r9
- addi r10,r10,32
- addi r9,r9,32
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
- sync
- stw r0,0(r10)
+ stw r0,0(r8)
L(no_vec):
-/* Restore ucontext (parm1) from stack. */
- lwz r12,_FRAME_PARM_SAVE1+16(r1)
+/* We need to set up parms and call sigprocmask which will clobber
+ volatile registers. So before the call we need to retrieve the
+ original ucontext ptr (parm1) from stack and store the UC_REGS_PTR
+ (current R3). */
+ lwz r12,_FRAME_PARM_SAVE1(r1)
li r4,0
stw r3,_UC_REGS_PTR(r12)
addi r5,r12,_UC_SIGMASK
diff -urN libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
--- libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-06-15 15:02:20.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-09-02 12:45:43.125302872 -0500
@@ -27,22 +27,23 @@
.machine "altivec"
ENTRY(__swapcontext)
- /* Save the current context */
+ stwu r1,-16(r1)
+/* Insure that the _UC_REGS start on a quadword boundary. */
stw r3,_FRAME_PARM_SAVE1(r1)
addi r3,r3,_UC_REG_SPACE+12
+ stw r4,_FRAME_PARM_SAVE2(r1) /* new context pointer */
clrrwi r3,r3,4
+
+/* Save the general purpose registers */
stw r0,_UC_GREGS+(PT_R0*4)(r3)
- stw r1,_UC_GREGS+(PT_R1*4)(r3)
mflr r0
- stwu r1,-16(r1)
- stw r0,20(r1)
- stw r31,12(r1)
- stw r31,_UC_GREGS+(PT_R31*4)(r3)
- mr r31,r4 /* new context pointer */
+ stw r2,_UC_GREGS+(PT_R2*4)(r3)
+ stw r4,_UC_GREGS+(PT_R4*4)(r3)
+/* Set the callers LR_SAVE, and the ucontext LR and NIP to the callers
+ return address. */
stw r0,_UC_GREGS+(PT_LNK*4)(r3)
stw r0,_UC_GREGS+(PT_NIP*4)(r3)
- stw r2,_UC_GREGS+(PT_R2*4)(r3)
- stw r4,_UC_GREGS+(PT_R4*4)(r3)
+ stw r0,_FRAME_LR_SAVE+16(r1)
stw r5,_UC_GREGS+(PT_R5*4)(r3)
stw r6,_UC_GREGS+(PT_R6*4)(r3)
stw r7,_UC_GREGS+(PT_R7*4)(r3)
@@ -69,16 +70,23 @@
stw r28,_UC_GREGS+(PT_R28*4)(r3)
stw r29,_UC_GREGS+(PT_R29*4)(r3)
stw r30,_UC_GREGS+(PT_R30*4)(r3)
- mfctr r0
- stw r0,_UC_GREGS+(PT_CTR*4)(r3)
- mfxer r0
- stw r0,_UC_GREGS+(PT_XER*4)(r3)
- mfcr r0
- stw r0,_UC_GREGS+(PT_CCR*4)(r3)
-
- /* Set the return value of swapcontext to "success". R3 is the only
- register whose value is not preserved in the saved context. */
+ stw r31,_UC_GREGS+(PT_R31*4)(r3)
+
+/* Save the value of R1. We had to push the stack before we
+ had the address of uc_reg_space. So compute the address of
+ the callers stack pointer and save it as R1. */
+ addi r8,r1,16
li r0,0
+/* Save the count, exception and condition registers. */
+ mfctr r11
+ mfxer r10
+ mfcr r9
+ stw r8,_UC_GREGS+(PT_R1*4)(r3)
+ stw r11,_UC_GREGS+(PT_CTR*4)(r3)
+ stw r10,_UC_GREGS+(PT_XER*4)(r3)
+ stw r9,_UC_GREGS+(PT_CCR*4)(r3)
+/* Set the return value of getcontext to "success". R3 is the only
+ register whose value is not preserved in the saved context. */
stw r0,_UC_GREGS+(PT_R3*4)(r3)
/* Zero fill fields that can't be set in user state. */
@@ -138,20 +146,30 @@
lwz r7,_dl_hwcap@l(r7)
#endif
andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
- beq L(no_vec)
la r10,(_UC_VREGS)(r3)
la r9,(_UC_VREGS+16)(r3)
+
+ beq L(no_vec)
+/* address of the combined VSCR/VSAVE quadword. */
+ la r8,(_UC_VREGS+512)(r3)
+/* Save the vector registers */
stvx v0,0,r10
stvx v1,0,r9
addi r10,r10,32
addi r9,r9,32
+/* We need to get the Vector Status and Control Register early to avoid
+ store order problems later with the VSAVE register that shares the
+ same quadword. */
+ mfvscr v0
stvx v2,0,r10
stvx v3,0,r9
addi r10,r10,32
addi r9,r9,32
+
+ stvx v0,0,r8
stvx v4,0,r10
stvx v5,0,r9
@@ -218,20 +236,15 @@
addi r10,r10,32
addi r9,r9,32
+ mfvscr v0
stvx v30,0,r10
stvx v31,0,r9
- addi r10,r10,32
- addi r9,r9,32
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
- sync
- stw r0,0(r10)
+ stw r0,0(r8)
L(no_vec):
/* Restore ucontext (parm1) from stack. */
- lwz r12,_FRAME_PARM_SAVE1+16(r1)
+ lwz r12,_FRAME_PARM_SAVE1(r1)
li r4,0
stw r3,_UC_REGS_PTR(r12)
addi r5,r12,_UC_SIGMASK
@@ -251,8 +264,8 @@
* r0, xer, ctr. We don't restore r2 since it will be used as
* the TLS pointer.
*/
- mr r4,r31
- lwz r31,_UC_REGS_PTR(r31)
+ lwz r4,_FRAME_PARM_SAVE2(r1)
+ lwz r31,_UC_REGS_PTR(r4)
lwz r0,_UC_GREGS+(PT_MSR*4)(r31)
cmpwi r0,0
bne L(do_sigret)
@@ -451,8 +464,7 @@
bctr
L(error_exit):
- lwz r31,12(r1)
- lwz r0,20(r1)
+ lwz r0,_FRAME_LR_SAVE+16(r1)
addi r1,r1,16
mtlr r0
blr

View File

@ -1,11 +0,0 @@
--- sysdeps/unix/sysv/linux/i386/sysdep.h.orig 2004-06-13 13:08:49.905902169 -0600
+++ sysdeps/unix/sysv/linux/i386/sysdep.h 2004-06-13 13:09:16.312954075 -0600
@@ -401,7 +401,7 @@
#define LOADARGS_0
#ifdef __PIC__
-# if defined I386_USE_SYSENTER
+# if defined I386_USE_SYSENTER && defined SHARED
# define LOADARGS_1 \
"bpushl .L__X'%k3, %k3\n\t"
# define LOADARGS_5 \

View File

@ -1,69 +0,0 @@
diff -u -r -N glibc-2.3.4-hppa/csu/elf-init.c glibc-2.3.4-hppa-hardened/csu/elf-init.c
--- glibc-2.3.4-hppa/csu/elf-init.c 2004-07-22 12:13:09.207029032 +0200
+++ glibc-2.3.4-hppa-hardened/csu/elf-init.c 2004-07-22 13:24:02.652407048 +0200
@@ -19,15 +19,14 @@
#include <stddef.h>
-#ifdef HAVE_INITFINI_ARRAY
-/* These magic symbols are provided by the linker. */
-extern void (*__preinit_array_start []) (void) attribute_hidden;
-extern void (*__preinit_array_end []) (void) attribute_hidden;
-extern void (*__init_array_start []) (void) attribute_hidden;
-extern void (*__init_array_end []) (void) attribute_hidden;
-extern void (*__fini_array_start []) (void) attribute_hidden;
-extern void (*__fini_array_end []) (void) attribute_hidden;
-#endif
+/* there is no hppalinux.xd and hppalinux.xdc linker script available */
+/* this is why __init_array_start|__init_array_end cannot be resolved */
+/* if we are using hardened with auto PIE, we need to disable startup */
+/* code for such additional arrays normally found in a PROVIDE script */
+
+/* the hppalinux.xd and .xdc scripts can easily be converted from the */
+/* hppalinux.xc shared linker scripts, using diffs from sparc example */
+/* however, the ld does not even automatically use these scripts then */
/* These function symbols are provided for the .init/.fini section entry
points automagically by the linker. */
@@ -42,41 +41,11 @@
void
__libc_csu_init (void)
{
-#ifdef HAVE_INITFINI_ARRAY
- /* For dynamically linked executables the preinit array is executed by
- the dynamic linker (before initializing any shared object. */
-
-# ifndef LIBC_NONSHARED
- /* For static executables, preinit happens rights before init. */
- {
- const size_t size = __preinit_array_end - __preinit_array_start;
- size_t i;
- for (i = 0; i < size; i++)
- (*__preinit_array_start [i]) ();
- }
-# endif
-#endif
-
_init ();
-
-#ifdef HAVE_INITFINI_ARRAY
- {
- const size_t size = __init_array_end - __init_array_start;
- size_t i;
- for (i = 0; i < size; i++)
- (*__init_array_start [i]) ();
- }
-#endif
}
void
__libc_csu_fini (void)
{
-#ifdef HAVE_INITFINI_ARRAY
- size_t i = __fini_array_end - __fini_array_start;
- while (i-- > 0)
- (*__fini_array_start [i]) ();
-#endif
-
_fini ();
}

View File

@ -1,60 +0,0 @@
diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-sysdep.c glibc-2.3.3/sysdeps/unix/sysv/linux/dl-sysdep.c
--- glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-sysdep.c 2004-08-16 10:47:10.361264216 -0400
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-sysdep.c 2004-08-16 10:47:55.068467688 -0400
@@ -1,5 +1,5 @@
/* Dynamic linker system dependencies for Linux.
- Copyright (C) 1995, 1997, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
the generic dynamic linker system interface code. */
#include <unistd.h>
+#include <ldsodefs.h>
+#include "kernel-features.h"
#define DL_SYSDEP_INIT frob_brk ()
@@ -28,6 +30,27 @@
frob_brk (void)
{
__brk (0); /* Initialize the break. */
+
+#if ! __ASSUME_BRK_PAGE_ROUNDED
+ /* If the dynamic linker was executed as a program, then the break may
+ start immediately after our data segment. However, dl-minimal.c has
+ already stolen the remainder of the page for internal allocations.
+ If we don't adjust the break location recorded by the kernel, the
+ normal program startup will inquire, find the value at our &_end,
+ and start allocating its own data there, clobbering dynamic linker
+ data structures allocated there during startup.
+
+ Later Linux kernels have changed this behavior so that the initial
+ break value is rounded up to the page boundary before we start. */
+
+ extern void *__curbrk attribute_hidden;
+ extern void _end attribute_hidden;
+ void *const endpage = (void *) 0 + (((__curbrk - (void *) 0)
+ + GLRO(dl_pagesize) - 1)
+ & -GLRO(dl_pagesize));
+ if (__builtin_expect (__curbrk >= &_end && __curbrk < endpage, 0))
+ __brk (endpage);
+#endif
}
#include <sysdeps/generic/dl-sysdep.c>
diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.3.3/sysdeps/unix/sysv/linux/kernel-features.h
--- glibc-2.3.3.old/sysdeps/unix/sysv/linux/kernel-features.h 2004-08-16 10:47:09.458401472 -0400
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/kernel-features.h 2004-08-16 10:48:02.345361432 -0400
@@ -400,3 +400,9 @@
#if __LINUX_KERNEL_VERSION >= 132612
# define __ASSUME_GETDENTS32_D_TYPE 1
#endif
+
+/* Starting with version 2.5.3, the initial location returned by `brk'
+ after exec is always rounded up to the next page. */
+#if __LINUX_KERNEL_VERSION >= 132355
+# define __ASSUME_BRK_PAGE_ROUNDED 1
+#endif

View File

@ -1,463 +0,0 @@
diff -Nru glibc-2.3.3/resolv/res_hconf.c libc-mdns/resolv/res_hconf.c
--- glibc-2.3.3/resolv/res_hconf.c 2004-11-04 15:14:48.265197552 -0500
+++ libc-mdns/resolv/res_hconf.c 2004-11-04 15:01:40.000000000 -0500
@@ -59,6 +59,7 @@
#define ENV_TRIM_ADD "RESOLV_ADD_TRIM_DOMAINS"
#define ENV_MULTI "RESOLV_MULTI"
#define ENV_REORDER "RESOLV_REORDER"
+#define ENV_MDNS "RESOLV_MDNS"
static const char *arg_service_list (const char *, int, const char *,
unsigned int);
@@ -81,7 +82,8 @@
{"multi", arg_bool, HCONF_FLAG_MULTI},
{"nospoof", arg_bool, HCONF_FLAG_SPOOF},
{"spoofalert", arg_bool, HCONF_FLAG_SPOOFALERT},
- {"reorder", arg_bool, HCONF_FLAG_REORDER}
+ {"reorder", arg_bool, HCONF_FLAG_REORDER},
+ {"mdns", arg_bool, HCONF_FLAG_MDNS}
};
/* Structure containing the state. */
@@ -431,6 +433,9 @@
memset (&_res_hconf, '\0', sizeof (_res_hconf));
+ /* Default for mdns is "on". */
+ _res_hconf.flags |= HCONF_FLAG_MDNS;
+
hconf_name = getenv (ENV_HOSTCONF);
if (hconf_name == NULL)
hconf_name = _PATH_HOSTCONF;
@@ -483,6 +488,10 @@
arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0);
}
+ envval = getenv (ENV_MDNS);
+ if (envval)
+ arg_bool (ENV_MDNS, 1, envval, HCONF_FLAG_MDNS);
+
_res_hconf.initialized = 1;
}
diff -Nru glibc-2.3.3/resolv/res_hconf.h libc-mdns/resolv/res_hconf.h
--- glibc-2.3.3/resolv/res_hconf.h 2001-07-06 00:55:39.000000000 -0400
+++ libc-mdns/resolv/res_hconf.h 2004-11-04 15:01:40.000000000 -0500
@@ -44,6 +44,7 @@
# define HCONF_FLAG_SPOOFALERT (1 << 2) /* syslog warning of spoofed */
# define HCONF_FLAG_REORDER (1 << 3) /* list best address first */
# define HCONF_FLAG_MULTI (1 << 4) /* see comments for gethtbyname() */
+# define HCONF_FLAG_MDNS (1 << 5) /* Disable MDNS support */
};
extern struct hconf _res_hconf;
diff -Nru glibc-2.3.3/resolv/res_query.c libc-mdns/resolv/res_query.c
--- glibc-2.3.3/resolv/res_query.c 2004-11-04 15:14:48.268197096 -0500
+++ libc-mdns/resolv/res_query.c 2004-11-04 15:01:40.000000000 -0500
@@ -82,6 +82,8 @@
#include <stdlib.h>
#include <string.h>
+#include "res_hconf.h"
+
/* Options. Leave them on. */
/* #undef DEBUG */
@@ -280,6 +282,13 @@
*domain && !done;
domain++) {
+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0) {
+ /* don't add "local" domain if query contains a dot */
+ if (dots && (!__strcasecmp(*domain, "local") ||
+ !__strcasecmp(*domain, "local.")))
+ continue;
+ }
+
if (domain[0][0] == '\0' ||
(domain[0][0] == '.' && domain[0][1] == '\0'))
root_on_list++;
diff -Nru glibc-2.3.3/resolv/res_send.c libc-mdns/resolv/res_send.c
--- glibc-2.3.3/resolv/res_send.c 2004-11-04 15:14:48.269196944 -0500
+++ libc-mdns/resolv/res_send.c 2004-11-04 15:06:31.000000000 -0500
@@ -85,6 +85,9 @@
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
+#if defined(_LIBC) && defined(linux)
+#include <net/if.h>
+#endif
#include <errno.h>
#include <fcntl.h>
@@ -96,6 +99,8 @@
#include <string.h>
#include <unistd.h>
+#include "res_hconf.h"
+
#if PACKETSZ > 65536
#define MAXPACKET PACKETSZ
#else
@@ -180,6 +185,9 @@
static int send_dg(res_state, const u_char *, int,
u_char **, int *, int *, int,
int *, int *, u_char **);
+static int send_dg_mdns(res_state, const u_char *, int,
+ u_char **, int *, int *, struct sockaddr_in6 *,
+ int *, int *, u_char **);
#ifdef DEBUG
static void Aerror(const res_state, FILE *, const char *, int,
const struct sockaddr *);
@@ -332,6 +340,35 @@
u_char *ans, int anssiz, u_char **ansp)
{
int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
+ int usemdns;
+ HEADER *qhp = (HEADER *) buf;
+
+ usemdns = 0;
+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0 &&
+ qhp->qr == 0 && qhp->opcode == QUERY && qhp->qdcount == htons(1)) {
+ /* got one simple query */
+ const u_char *bp, *be;
+ be = buf + buflen;
+ for (bp = buf + NS_HFIXEDSZ; bp < be; )
+ if ((*bp & NS_CMPRSFLGS) != 0)
+ break;
+ else if (*bp) {
+ if (*bp == 5 && !strncasecmp(bp, "\005local\000", 7)) {
+ usemdns = 1;
+ break;
+ }
+ if (*bp == 3 && !strncasecmp(bp, "\003254\003169\007in-addr\004arpa\000", 22)) {
+ usemdns = 1;
+ break;
+ }
+ if (*bp == 1 && !strncasecmp(bp, "\0010\0018\001e\001f\003ip6\004arpa\000", 18)) {
+ usemdns = 2;
+ break;
+ }
+ bp += *bp + 1;
+ } else
+ break;
+ }
if (statp->nscount == 0) {
__set_errno (ESRCH);
@@ -465,10 +502,27 @@
* Send request, RETRY times, or until successful.
*/
for (try = 0; try < statp->retry; try++) {
- for (ns = 0; ns < MAXNS; ns++)
+ for (ns = 0; ns < (usemdns ? 1 : MAXNS); ns++)
{
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
+ if (usemdns == 1) {
+ static struct sockaddr_in mdns4;
+ mdns4.sin_family = AF_INET;
+ mdns4.sin_port = htons(5353);
+ mdns4.sin_addr.s_addr = htonl(0xe00000fb);
+ nsap = (struct sockaddr_in6 *)&mdns4;
+ }
+ if (usemdns == 2) {
+ static struct sockaddr_in6 mdns6;
+ mdns6.sin6_family = AF_INET6;
+ mdns6.sin6_port = htons(5353);
+ mdns6.sin6_addr.s6_addr32[0] = htonl(0xff020000);
+ mdns6.sin6_addr.s6_addr32[3] = htonl(0x000000fb);
+ nsap = &mdns6;
+ }
+
+
if (nsap == NULL)
goto next_ns;
same_ns:
@@ -525,8 +579,11 @@
resplen = n;
} else {
/* Use datagrams. */
- n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
- ns, &v_circuit, &gotsomewhere, ansp);
+ if (usemdns)
+ n = send_dg_mdns(statp, buf, buflen, &ans, &anssiz, &terrno, nsap, &v_circuit, &gotsomewhere, ansp);
+ else
+ n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
+ ns, &v_circuit, &gotsomewhere, ansp);
if (n < 0)
return (-1);
if (n == 0)
@@ -593,8 +650,15 @@
if (!v_circuit) {
if (!gotsomewhere)
__set_errno (ECONNREFUSED); /* no nameservers found */
- else
+ else if (!usemdns) {
__set_errno (ETIMEDOUT); /* no answer obtained */
+ } else {
+ /* treat timeout as host not found */
+ HEADER *anhp = (HEADER *) ans;
+ memset(ans, 0, HFIXEDSZ);
+ anhp->rcode = NXDOMAIN;
+ return HFIXEDSZ;
+ }
} else
__set_errno (terrno);
return (-1);
@@ -1035,6 +1099,255 @@
}
}
+static int
+send_dg_mdns(res_state statp,
+ const u_char *buf, int buflen, u_char **ansp, int *anssizp,
+ int *terrno, struct sockaddr_in6 *nsap, int *v_circuit, int *gotsomewhere, u_char **anscp)
+{
+ const HEADER *hp = (HEADER *) buf;
+ u_char *ans = *ansp;
+ int anssiz = *anssizp;
+ HEADER *anhp = (HEADER *) ans;
+ struct timespec now, timeout, finish;
+ struct pollfd pfd[32];
+ int ptimeout;
+ int fromlen, resplen, seconds, n, s;
+ int on = 1;
+ struct msghdr mhdr;
+ struct iovec iov;
+ u_char cmsgbuf[CMSG_SPACE(sizeof(int))];
+ struct cmsghdr *cmsg;
+ int ttl;
+ struct ifconf ifconf;
+ struct ifreq ifreq[64];
+ int ifreqn;
+ int i, j;
+ int ifidx[32], ifidxn;
+ struct ip_mreqn mreqn;
+
+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
+ if (s < 0) {
+ *terrno = errno;
+ Perror(statp, stderr, "socket(dg)", errno);
+ return (-1);
+ }
+ ifconf.ifc_len = sizeof(ifreq);
+ ifconf.ifc_req = ifreq;
+ ifidxn = 0;
+ if (ioctl(s, SIOCGIFCONF, &ifconf) == 0) {
+ ifreqn = ifconf.ifc_len / sizeof(*ifreq);
+ for (i = 0 ; i < ifreqn; i++) {
+ if (ioctl(s, SIOCGIFFLAGS, ifreq + i))
+ continue;
+ if (!(ifreq[i].ifr_flags & IFF_MULTICAST))
+ continue;
+ if (ioctl(s, SIOCGIFINDEX, ifreq + i))
+ continue;
+ for (j = 0; j < ifidxn; j++)
+ if (ifidx[j] == ifreq[i].ifr_ifindex)
+ break;
+ if (j < ifidxn)
+ continue;
+ ifidx[ifidxn++] = ifreq[i].ifr_ifindex;
+ if (ifidxn == sizeof(ifidx)/sizeof(*ifidx))
+ break;
+ }
+ }
+ j = 0;
+ for (i = 0; i < (ifidxn ? ifidxn : 1); i++) {
+ if (i) {
+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
+ if (!s)
+ continue;
+ }
+ if (setsockopt(s, SOL_IP, IP_RECVTTL, &on, sizeof(on))) {
+ *terrno = errno;
+ Perror(statp, stderr, "IP_RECVTTL(dg)", errno);
+ close(s);
+ continue;
+ }
+ if (ifidxn) {
+ memset(&mreqn, 0, sizeof(mreqn));
+ mreqn.imr_ifindex = ifidx[i];
+ if (setsockopt(s, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn))) {
+ *terrno = errno;
+ Perror(statp, stderr, "IP_MULTICAST_IF", errno);
+ close(s);
+ continue;
+ }
+ }
+ if (sendto(s, (char*)buf, buflen, 0,
+ (struct sockaddr *)nsap, sizeof *nsap) != buflen) {
+ Aerror(statp, stderr, "sendto", errno, *(struct sockaddr_in *)nsap);
+ close(s);
+ continue;
+ }
+ pfd[j].fd = s;
+ pfd[j].events = POLLIN;
+ j++;
+ }
+ /*
+ * Wait for reply.
+ */
+ seconds = statp->retrans;
+ if (seconds <= 0)
+ seconds = 1;
+ evNowTime(&now);
+ evConsTime(&timeout, seconds, 0);
+ evAddTime(&finish, &now, &timeout);
+ wait:
+ if (j == 0) {
+ return (0);
+ }
+
+ /* Convert struct timespec in milliseconds. */
+ ptimeout = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000;
+ n = __poll (pfd, j, ptimeout);
+ if (n == 0) {
+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
+ *gotsomewhere = 1;
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+ return (0);
+ }
+ if (n < 0) {
+ if (errno == EINTR) {
+ evNowTime(&now);
+ if (evCmpTime(finish, now) > 0) {
+ evSubTime(&timeout, &finish, &now);
+ goto wait;
+ }
+ }
+ Perror(statp, stderr, "select", errno);
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+ res_nclose(statp);
+ return (0);
+ }
+ for (i = 0; i < j - 1; i++)
+ if (pfd[j].revents == POLLIN)
+ break;
+ s = pfd[i].fd;
+ __set_errno (0);
+ fromlen = sizeof(struct sockaddr_in6);
+ if (anssiz < MAXPACKET
+ && anscp
+ && (ioctl (s, FIONREAD, &resplen) < 0
+ || anssiz < resplen)) {
+ ans = malloc (MAXPACKET);
+ if (ans == NULL)
+ ans = *ansp;
+ else {
+ anssiz = MAXPACKET;
+ *anssizp = MAXPACKET;
+ *ansp = ans;
+ *anscp = ans;
+ anhp = (HEADER *) ans;
+ }
+ }
+ iov.iov_base = ans;
+ iov.iov_len = anssiz;
+ mhdr.msg_name = 0;
+ mhdr.msg_namelen = 0;
+ mhdr.msg_iov = &iov;
+ mhdr.msg_iovlen = 1;
+ mhdr.msg_control = cmsgbuf;
+ mhdr.msg_controllen = sizeof(cmsgbuf);
+ mhdr.msg_flags = 0;
+ resplen = recvmsg(s, &mhdr, 0);
+ if (resplen <= 0) {
+ if (errno == EAGAIN)
+ goto wait;
+ Perror(statp, stderr, "recvfrom", errno);
+wait2:
+ close(s);
+ if (i < j)
+ memmove(pfd + i, pfd + i + 1, sizeof(*pfd) * (j - i));
+ j--;
+ goto wait;
+ }
+ cmsg = CMSG_FIRSTHDR(&mhdr);
+ for (cmsg = CMSG_FIRSTHDR(&mhdr); cmsg; CMSG_NXTHDR(&mhdr, cmsg))
+ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_TTL)
+ break;
+ if (!cmsg) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; no TTL found\n"));
+ goto wait2;
+ }
+ ttl = *(int *)CMSG_DATA(cmsg);
+ if (ttl != 255) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; answer with bad TTL: %d \n", ttl));
+ goto wait;
+ }
+ *gotsomewhere = 1;
+ if (resplen < HFIXEDSZ) {
+ /*
+ * Undersized message.
+ */
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; undersized: %d\n",
+ resplen));
+ *terrno = EMSGSIZE;
+ goto wait;
+ }
+ if (hp->id != anhp->id) {
+ /*
+ * response from old query, ignore it.
+ * XXX - potential security hazard could
+ * be detected here.
+ */
+ DprintQ((statp->options & RES_DEBUG) ||
+ (statp->pfcode & RES_PRF_REPLY),
+ (stdout, ";; old answer:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ if (!(statp->options & RES_INSECURE2) &&
+ !res_queriesmatch(buf, buf + buflen,
+ ans, ans + anssiz)) {
+ /*
+ * response contains wrong query? ignore it.
+ * XXX - potential security hazard could
+ * be detected here.
+ */
+ DprintQ((statp->options & RES_DEBUG) ||
+ (statp->pfcode & RES_PRF_REPLY),
+ (stdout, ";; wrong query name:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ if (anhp->rcode == SERVFAIL ||
+ anhp->rcode == NOTIMP ||
+ anhp->rcode == REFUSED) {
+ DprintQ(statp->options & RES_DEBUG,
+ (stdout, "server rejected query:\n"),
+ ans, (resplen > anssiz) ? anssiz : resplen);
+ goto wait;
+ }
+ for (i = 0; i < j; i++)
+ close(pfd[i].fd);
+#if 0
+ if (!(statp->options & RES_IGNTC) && anhp->tc) {
+ /*
+ * To get the rest of answer,
+ * use TCP with same server.
+ */
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; truncated answer\n"));
+ *v_circuit = 1;
+ res_nclose(statp);
+ return (1);
+ }
+#endif
+ /*
+ * All is well, or the error is fatal. Signal that the
+ * next nameserver ought not be tried.
+ */
+ return (resplen);
+}
+
#ifdef DEBUG
static void
Aerror(const res_state statp, FILE *file, const char *string, int error,

View File

@ -1,36 +0,0 @@
2004-11-08 Richard Sandiford <rsandifo@redhat.com>
* sysdeps/mips/sys/regdef.h: Include #include <sgidefs.h>
* sysdeps/mips/sys/ucontext.h: Likewise.
Index: sysdeps/mips/sys/regdef.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/sys/regdef.h,v
retrieving revision 1.4
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 regdef.h
--- sysdeps/mips/sys/regdef.h 9 Apr 2003 02:51:04 -0000 1.4
+++ sysdeps/mips/sys/regdef.h 28 Oct 2004 12:57:20 -0000
@@ -20,6 +20,8 @@
#ifndef _SYS_REGDEF_H
#define _SYS_REGDEF_H
+#include <sgidefs.h>
+
/*
* Symbolic register names for 32 bit ABI
*/
Index: sysdeps/mips/sys/ucontext.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/sys/ucontext.h,v
retrieving revision 1.4
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 ucontext.h
--- sysdeps/mips/sys/ucontext.h 17 Mar 2003 15:47:12 -0000 1.4
+++ sysdeps/mips/sys/ucontext.h 28 Oct 2004 12:57:20 -0000
@@ -23,6 +23,7 @@ #define _SYS_UCONTEXT_H 1
#include <features.h>
#include <signal.h>
+#include <sgidefs.h>
/* Type for general register. */
#if _MIPS_SIM == _MIPS_SIM_ABI32

View File

@ -1,254 +0,0 @@
--- sysdeps/unix/sysv/linux/mips/configure.in.orig 2004-09-29 23:49:30.000000000 -0400
+++ sysdeps/unix/sysv/linux/mips/configure.in 2004-09-30 02:04:26.000000000 -0400
@@ -19,50 +19,62 @@ mips*64*)
AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
echo '#include <asm/unistd.h>' > asm-unistd.h
else
- # The point of this preprocessing is to turn __NR_<syscall> into
- # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
- # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
- # and <abi> is the compiler-enabled ABI.
+ # There are two versions of this header. The older form defined
+ # __NR_foo, __NR_N32_foo, and __NR_O32_foo. The new form defines
+ # only __NR_foo, but does it based on the current ABI.
+ # We want to have __NR_O32_foo, __NR_N64_foo, and __NR_N32_foo defined
+ # always, and __NR_foo defined conditionally. Only the newer form is
+ # supported.
cat "$asm_unistd_h" |
- sed -e 's,__NR_,__NR_N64_,g' \
- -e 's,__NR_N64_##,__NR_##,g' \
- -e 's,__NR_N64_O32_,__NR_O32_,g' \
- -e 's,__NR_N64_N32_,__NR_N32_,g' \
- -e 's,__NR_N64_N64_,__NR_N64_,g' \
- | awk > asm-unistd.h '
+ awk > asm-unistd.h '
BEGIN { print "#include <sgidefs.h>"; }
-/^#define __NR.*unused/ { print; next; }
-/^#define __NR_N64__exit __NR_N64_exit/ {
- print "#define __NR__exit __NR_exit";
- print "#define __NR_O32__exit __NR_O32_exit";
- print "#define __NR_N32__exit __NR_N32_exit";
- print; next;
-}
-/^#define __NR_O32_/ {
- name = $2;
- sub (/_O32_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_ABI32/,/^#endif.*_MIPS_SIM_ABI32/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_O32_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
- print "# define " name " " $2;
- print "#endif";
- next;
+ print; next;
+ }
+ print; next;
}
-/^#define __NR_N32_/ {
- name = $2;
- sub (/_N32_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_NABI32/,/^#endif.*_MIPS_SIM_NABI32/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_N32_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
- print "# define " name " " $2;
- print "#endif";
- next;
+ print; next;
+ }
+ print; next;
}
-/^#define __NR_N64_/ {
- name = $2;
- sub (/_N64_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_ABI64/,/^#endif.*_MIPS_SIM_ABI64/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_N64_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
- print "# define " name " " $2;
- print "#endif";
+ print; next;
+ }
+ print; next;
+}
+/^#define __NR_64_/ {
+ line = $0;
+ gsub (/_NR_64_/, "_NR_N64_", line);
+ print;
+ print line;
next;
}
{
--- sysdeps/unix/sysv/linux/mips/configure.orig 2004-09-29 23:49:30.000000000 -0400
+++ sysdeps/unix/sysv/linux/mips/configure 2004-09-30 02:06:58.000000000 -0400
@@ -19,50 +19,62 @@ mips*64*)
echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
echo '#include <asm/unistd.h>' > asm-unistd.h
else
- # The point of this preprocessing is to turn __NR_<syscall> into
- # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
- # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
- # and <abi> is the compiler-enabled ABI.
+ # There are two versions of this header. The older form defined
+ # __NR_foo, __NR_N32_foo, and __NR_O32_foo. The new form defines
+ # only __NR_foo, but does it based on the current ABI.
+ # We want to have __NR_O32_foo, __NR_N64_foo, and __NR_N32_foo defined
+ # always, and __NR_foo defined conditionally. Only the newer form is
+ # supported.
cat "$asm_unistd_h" |
- sed -e 's,__NR_,__NR_N64_,g' \
- -e 's,__NR_N64_##,__NR_##,g' \
- -e 's,__NR_N64_O32_,__NR_O32_,g' \
- -e 's,__NR_N64_N32_,__NR_N32_,g' \
- -e 's,__NR_N64_N64_,__NR_N64_,g' \
- | awk > asm-unistd.h '
+ awk > asm-unistd.h '
BEGIN { print "#include <sgidefs.h>"; }
-/^#define __NR.*unused/ { print; next; }
-/^#define __NR_N64__exit __NR_N64_exit/ {
- print "#define __NR__exit __NR_exit";
- print "#define __NR_O32__exit __NR_O32_exit";
- print "#define __NR_N32__exit __NR_N32_exit";
- print; next;
-}
-/^#define __NR_O32_/ {
- name = $2;
- sub (/_O32_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_ABI32/,/^#endif.*_MIPS_SIM_ABI32/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_O32_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
- print "# define " name " " $2;
- print "#endif";
- next;
+ print; next;
+ }
+ print; next;
}
-/^#define __NR_N32_/ {
- name = $2;
- sub (/_N32_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_NABI32/,/^#endif.*_MIPS_SIM_NABI32/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_N32_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
- print "# define " name " " $2;
- print "#endif";
- next;
+ print; next;
+ }
+ print; next;
}
-/^#define __NR_N64_/ {
- name = $2;
- sub (/_N64_/, "_", name);
- print;
+/^#if _MIPS_SIM == _MIPS_SIM_ABI64/,/^#endif.*_MIPS_SIM_ABI64/ {
+ if (/^#define __NR_Linux/) { print; next; }
+ if (/^#define __NR_/) {
+ line = $0;
+ gsub (/_NR_/, "_NR_N64_", line);
+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */";
+ print "";
+ print line;
+ print "";
print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
- print "# define " name " " $2;
- print "#endif";
+ print; next;
+ }
+ print; next;
+}
+/^#define __NR_64_/ {
+ line = $0;
+ gsub (/_NR_64_/, "_NR_N64_", line);
+ print;
+ print line;
next;
}
{
--- sysdeps/unix/sysv/linux/mips/Makefile.orig 2004-09-29 23:49:30.000000000 -0400
+++ sysdeps/unix/sysv/linux/mips/Makefile 2004-09-30 02:12:30.000000000 -0400
@@ -12,7 +12,7 @@ no_syscall_list_h = 1
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
-$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
+$(objpfx)syscall-list.h $(objpfx)syscall-list.d: $(common-objpfx)asm-unistd.h
$(make-target-directory)
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
@@ -22,35 +22,9 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.
echo '#endif'; \
echo ''; \
echo '#include <sgidefs.h>'; \
- rm -f $(@:.d=.h).newt; \
- $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
- -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
- sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
- > $(@:.d=.h).newt; \
- if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
- echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \
- sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
- echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \
- sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
- echo '#else'; \
- sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
- echo '#endif'; \
- sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort +1.8; \
- else \
- cat $(@:.d=.h).newt; \
- fi; \
- rm $(@:.d=.h).newt; \
+ grep -E '^#.*(MIPS_SIM|__NR)' $(common-objpfx)asm-unistd.h \
+ | sed 's/__NR_/SYS_/g' ; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
-ifneq (,$(objpfx))
- sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
- rm -f $(@:.h=.d)-t
- mv -f $(@:.h=.d)-t2 $(@:.h=.d)
-else
- mv -f $(@:.h=.d)-t $(@:.h=.d)
-endif
+ echo > $(@:.h=.d)
endif

View File

@ -1,32 +0,0 @@
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (PROT_GROWSDOWN):
Define.
(PROT_GROWSUP): Likewise.
Please apply.
Maciej
glibc-2.3.3-20041018-mips-prot_grows-1
diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h
--- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h Sat Mar 8 03:26:00 2003
+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h Mon Oct 18 14:48:57 2004
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */

View File

@ -1,31 +0,0 @@
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): Define.
Please apply.
Maciej
glibc-2.3.3-20041018-mips-rtld_deepbind-2.patch
diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/mips/bits/dlfcn.h glibc-2.3.3-20041018/sysdeps/mips/bits/dlfcn.h
--- glibc-2.3.3-20041018.macro/sysdeps/mips/bits/dlfcn.h Sat Oct 27 02:25:51 2001
+++ glibc-2.3.3-20041018/sysdeps/mips/bits/dlfcn.h Mon Oct 18 16:21:44 2004
@@ -1,5 +1,6 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,8 +25,9 @@
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x0001 /* Lazy function call binding. */
#define RTLD_NOW 0x0002 /* Immediate function call binding. */
-#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00008 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made

View File

@ -1,54 +0,0 @@
Index: linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
===================================================================
RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h,v
retrieving revision 1.2
diff -u -r1.2 sysdep-cancel.h
--- linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 28 Jul 2003 18:45:37 -0000 1.2
+++ linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 1 Jun 2004 17:19:08 -0000
@@ -27,9 +27,6 @@
#ifdef __PIC__
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
- .align 2; \
- 99: la t9,__syscall_error; \
- jr t9; \
ENTRY (name) \
.set noreorder; \
.cpload t9; \
@@ -44,25 +41,25 @@
ret; \
L(pseudo_cancel): \
SAVESTK_##args; \
- sw ra, 28(sp); \
- sw gp, 32(sp); \
+ sw gp, 28(sp); \
+ sw ra, 32(sp); \
PUSHARGS_##args; /* save syscall args */ \
CENABLE; \
- lw gp, 32(sp); \
- sw v0, 44(sp); /* save mask */ \
+ lw gp, 28(sp); \
+ sw v0, 36(sp); /* save mask */ \
POPARGS_##args; /* restore syscall args */ \
.set noreorder; \
li v0, SYS_ify (syscall_name); \
syscall; \
.set reorder; \
- sw v0, 36(sp); /* save syscall result */ \
- sw a3, 40(sp); /* save syscall error flag */ \
- lw a0, 44(sp); /* pass mask as arg1 */ \
+ sw v0, 40(sp); /* save syscall result */ \
+ sw a3, 44(sp); /* save syscall error flag */ \
+ lw a0, 36(sp); /* pass mask as arg1 */ \
CDISABLE; \
- lw gp, 32(sp); \
- lw v0, 36(sp); /* restore syscall result */ \
- lw a3, 40(sp); /* restore syscall error flag */ \
- lw ra, 28(sp); /* restore return address */ \
+ lw gp, 28(sp); \
+ lw v0, 40(sp); /* restore syscall result */ \
+ lw a3, 44(sp); /* restore syscall error flag */ \
+ lw ra, 32(sp); /* restore return address */ \
RESTORESTK; \
bne a3, zero, SYSCALL_ERROR_LABEL; \
L(pseudo_end):

View File

@ -1,44 +0,0 @@
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use
__NTH instead of __THROW in the inline definition.
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set):
Likewise.
Please apply.
Maciej
glibc-2.3.3-20041018-mips-nth-1.patch
diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/socket.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/socket.h
--- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/socket.h Thu Sep 27 02:25:58 2001
+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/socket.h Mon Oct 18 13:12:39 2004
@@ -1,5 +1,6 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -261,7 +262,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
# define _EXTERN_INLINE extern __inline
# endif
_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/sys/tas.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/sys/tas.h
--- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/sys/tas.h Wed Jul 21 01:26:43 2004
+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/sys/tas.h Mon Oct 18 11:18:56 2004
@@ -35,7 +35,7 @@ extern int _test_and_set (int *p, int v)
# endif
_EXTERN_INLINE int
-_test_and_set (int *p, int v) __THROW
+__NTH (_test_and_set (int *p, int v))
{
int r, t;

View File

@ -1,229 +0,0 @@
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-06-14 19:28:43.131988368 -0500
@@ -187,8 +187,8 @@
addi r9,r9,32
stvx v18,0,r10
- stvx v11,0,r9
- addi r19,r10,32
+ stvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
stvx v20,0,r10
@@ -221,11 +221,6 @@
addi r10,r10,32
addi r9,r9,32
- stvx v10,0,r10
- stvx v11,0,r9
- addi r10,r10,32
- addi r9,r9,32
-
mfvscr v0
mfspr r0,VRSAVE
stvx v0,0,r10
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-06-14 19:36:33.639954472 -0500
@@ -133,8 +133,8 @@
addi r9,r9,32
lvx v18,0,r10
- lvx v11,0,r9
- addi r19,r10,32
+ lvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
lvx v20,0,r10
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-06-14 19:39:49.580990280 -0500
@@ -189,8 +189,8 @@
addi r9,r9,32
stvx v18,0,r10
- stvx v11,0,r9
- addi r19,r10,32
+ stvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
stvx v20,0,r10
@@ -223,11 +223,6 @@
addi r10,r10,32
addi r9,r9,32
- stvx v10,0,r10
- stvx v11,0,r9
- addi r10,r10,32
- addi r9,r9,32
-
mfvscr v0
mfspr r0,VRSAVE
stvx v0,0,r10
@@ -339,8 +334,8 @@
addi r9,r9,32
lvx v18,0,r10
- lvx v11,0,r9
- addi r19,r10,32
+ lvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
lvx v20,0,r10
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-06-14 19:27:34.406052600 -0500
@@ -268,21 +268,22 @@
stfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
ld r5,.LC__dl_hwcap@toc(r2)
- li r10,0
# ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
# else
ld r5,0(r5) /* Load extern _dl_hwcap. */
-# endif
- andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
- beq L(has_no_vec)
-
+# endif
la r10,(SIGCONTEXT_V_RESERVE+8)(r3)
la r9,(SIGCONTEXT_V_RESERVE+24)(r3)
+
+ andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
+
clrrdi r10,r10,4
+ beq L(has_no_vec)
clrrdi r9,r9,4
-
+ mr r5,r10 /* Capture *v_regs value in r5. */
+
stvx v0,0,r10
stvx v1,0,r9
addi r10,r10,32
@@ -329,8 +330,8 @@
addi r9,r9,32
stvx v18,0,r10
- stvx v11,0,r9
- addi r19,r10,32
+ stvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
stvx v20,0,r10
@@ -363,11 +364,6 @@
addi r10,r10,32
addi r9,r9,32
- stvx v10,0,r10
- stvx v11,0,r9
- addi r10,r10,32
- addi r9,r9,32
-
mfvscr v0
mfspr r0,VRSAVE
stvx v0,0,r10
@@ -378,7 +374,7 @@
Store either a NULL or a quadword aligned pointer to the Vector register
array into *v_regs.
*/
- std r10,(SIGCONTEXT_V_REGS_PTR)(r3)
+ std r5,(SIGCONTEXT_V_REGS_PTR)(r3)
addi r5,r3,UCONTEXT_SIGMASK
li r4,0
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-06-09 11:28:37.000000000 -0500
@@ -293,8 +293,8 @@
addi r9,r9,32
lvx v18,0,r10
- lvx v11,0,r9
- addi r19,r10,32
+ lvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
lvx v20,0,r10
diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
--- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-05-28 16:19:18.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-06-14 19:28:05.164035488 -0500
@@ -391,20 +391,22 @@
stfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
ld r8,.LC__dl_hwcap@toc(r2)
- li r10,0
#ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
#else
ld r8,0(r8) /* Load extern _dl_hwcap. */
#endif
- andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
- beq L(has_no_vec)
-
la r10,(SIGCONTEXT_V_RESERVE+8)(r3)
la r9,(SIGCONTEXT_V_RESERVE+24)(r3)
+
+ andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
+
clrrdi r10,r10,4
+ beq L(has_no_vec)
+
clrrdi r9,r9,4
+ mr r8,r10 /* Capture *v_regs value in r5. */
stvx v0,0,r10
stvx v1,0,r9
@@ -452,8 +454,8 @@
addi r9,r9,32
stvx v18,0,r10
- stvx v11,0,r9
- addi r19,r10,32
+ stvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
stvx v20,0,r10
@@ -486,11 +488,6 @@
addi r10,r10,32
addi r9,r9,32
- stvx v10,0,r10
- stvx v11,0,r9
- addi r10,r10,32
- addi r9,r9,32
-
mfvscr v0
mfspr r0,VRSAVE
stvx v0,0,r10
@@ -501,7 +498,7 @@
Store either a NULL or a quadword aligned pointer to the Vector register
array into *v_regs.
*/
- std r10,(SIGCONTEXT_V_REGS_PTR)(r3)
+ std r8,(SIGCONTEXT_V_REGS_PTR)(r3)
mr r31,r4
addi r5,r3,UCONTEXT_SIGMASK
@@ -596,8 +593,8 @@
addi r9,r9,32
lvx v18,0,r10
- lvx v11,0,r9
- addi r19,r10,32
+ lvx v19,0,r9
+ addi r10,r10,32
addi r9,r9,32
lvx v20,0,r10

View File

@ -1,96 +0,0 @@
--- glibc-2.3.3.old/nptl/sysdeps/pthread/pthread.h 2004-09-21 19:52:49.003553536 +0000
+++ glibc-2.3.3/nptl/sysdeps/pthread/pthread.h 2004-09-21 19:55:01.582398488 +0000
@@ -27,6 +27,7 @@
#include <signal.h>
#include <bits/pthreadtypes.h>
#include <bits/setjmp.h>
+#include <bits/wordsize.h>
/* Detach state. */
@@ -63,17 +64,26 @@
#define PTHREAD_MUTEX_INITIALIZER \
{ }
#ifdef __USE_GNU
-# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
- { .__data = { .__kind = PTHREAD_MUTEX_RECURSIVE_NP } }
-# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
- { .__data = { .__kind = PTHREAD_MUTEX_ERRORCHECK_NP } }
-# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
- { .__data = { .__kind = PTHREAD_MUTEX_ADAPTIVE_NP } }
+# if __WORDSIZE == 64
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
+# else
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
+# endif
#endif
/* Read-write lock types. */
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
enum
{
PTHREAD_RWLOCK_PREFER_READER_NP,
@@ -81,15 +91,21 @@
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
};
-#endif /* Unix98 */
/* Read-write lock initializers. */
-#define PTHREAD_RWLOCK_INITIALIZER \
+# define PTHREAD_RWLOCK_INITIALIZER \
{ }
-#ifdef __USE_GNU
-# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
- { .__data = { .__flags = PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-#endif
+# ifdef __USE_GNU
+# if __WORDSIZE == 64
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+# else
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+# endif
+# endif
+#endif /* Unix98 or XOpen2K */
/* Scheduler inheritance. */
@@ -390,9 +406,12 @@
/* Guarantee that the initialization function INIT_ROUTINE will be called
only once, even if pthread_once is executed several times with the
same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
- extern variable initialized to PTHREAD_ONCE_INIT. */
+ extern variable initialized to PTHREAD_ONCE_INIT.
+
+ The initialization functions might throw exception which is why
+ this function is not marked with __THROW. */
extern int pthread_once (pthread_once_t *__once_control,
- void (*__init_routine) (void)) __THROW;
+ void (*__init_routine) (void));
/* Functions for handling cancellation.
@@ -699,7 +718,7 @@
#endif
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Functions for handling read-write locks. */
/* Initialize read-write lock RWLOCK using attributes ATTR, or use

View File

@ -1,120 +0,0 @@
2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
* resolv/res_libc.c: Move definition of __res_maybe_init ...
* resolv/res_init.c: ... here.
2004-08-11 Andreas Schwab <schwab@suse.de>
* resolv/res_libc.c: Move definition of __res_initstamp ...
* resolv/res_init.c: ... here.
--- resolv/res_init.c.res_init 2004-08-11 14:23:06.000000000 -0700
+++ resolv/res_init.c 2004-08-12 16:29:09.000000000 -0700
@@ -106,6 +106,10 @@ static u_int32_t net_mask __P((struct in
# define isascii(c) (!(c & 0200))
#endif
+#ifdef _LIBC
+unsigned long long int __res_initstamp attribute_hidden;
+#endif
+
/*
* Resolver state default settings.
*/
@@ -162,7 +166,6 @@ __res_vinit(res_state statp, int preinit
int dots;
#endif
#ifdef _LIBC
- extern unsigned long long int __res_initstamp attribute_hidden;
statp->_u._ext.initstamp = __res_initstamp;
#endif
@@ -574,6 +577,39 @@ libc_hidden_def (__res_nclose)
#endif
#ifdef _LIBC
+/* Initialize resp if RES_INIT is not yet set or if res_init in some other
+ thread requested re-initializing. */
+int
+__res_maybe_init (res_state resp, int preinit)
+{
+ if (resp->options & RES_INIT) {
+ if (__res_initstamp != resp->_u._ext.initstamp) {
+ if (resp->nscount > 0) {
+ __res_nclose (resp);
+ for (int ns = 0; ns < MAXNS; ns++) {
+ free (resp->_u._ext.nsaddrs[ns]);
+ resp->_u._ext.nsaddrs[ns] = NULL;
+ }
+ return __res_vinit (resp, 1);
+ }
+ }
+ return 0;
+ } else if (preinit) {
+ if (!resp->retrans)
+ resp->retrans = RES_TIMEOUT;
+ if (!resp->retry)
+ resp->retry = 4;
+ resp->options = RES_DEFAULT;
+ if (!resp->id)
+ resp->id = res_randomid ();
+ return __res_vinit (resp, 1);
+ } else
+ return __res_ninit (resp);
+}
+libc_hidden_def (__res_maybe_init)
+#endif
+
+#ifdef _LIBC
# ifdef _LIBC_REENTRANT
/* This is called when a thread is exiting to free resources held in _res. */
static void __attribute__ ((section ("__libc_thread_freeres_fn")))
--- resolv/res_libc.c.res_init 2004-08-11 14:23:06.000000000 -0700
+++ resolv/res_libc.c 2004-08-12 16:28:00.000000000 -0700
@@ -28,7 +28,7 @@
out) since res_init() should go into libc.so but the rest of that
file should not. */
-unsigned long long int __res_initstamp attribute_hidden;
+extern unsigned long long int __res_initstamp attribute_hidden;
/* We have atomic increment operations on 64-bit platforms. */
#if __WORDSIZE == 64
# define atomicinclock(lock) (void) 0
@@ -94,37 +94,6 @@ res_init(void) {
return (__res_vinit(&_res, 1));
}
-
-/* Initialize resp if RES_INIT is not yet set or if res_init in some other
- thread requested re-initializing. */
-int
-__res_maybe_init (res_state resp, int preinit)
-{
- if (resp->options & RES_INIT) {
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0) {
- __res_nclose (resp);
- for (int ns = 0; ns < MAXNS; ns++) {
- free (resp->_u._ext.nsaddrs[ns]);
- resp->_u._ext.nsaddrs[ns] = NULL;
- }
- return __res_vinit (resp, 1);
- }
- }
- return 0;
- } else if (preinit) {
- if (!resp->retrans)
- resp->retrans = RES_TIMEOUT;
- if (!resp->retry)
- resp->retry = 4;
- resp->options = RES_DEFAULT;
- if (!resp->id)
- resp->id = res_randomid ();
- return __res_vinit (resp, 1);
- } else
- return __res_ninit (resp);
-}
-libc_hidden_def (__res_maybe_init)
/* This needs to be after the use of _res in res_init, above. */
#undef _res

View File

@ -1,129 +0,0 @@
--- sysdeps/i386/elf/start.S.orig 1969-12-31 19:00:00.000000000 -0500
+++ sysdeps/i386/elf/start.S 2004-08-08 10:07:01.718652784 -0400
@@ -0,0 +1,126 @@
+/* Startup code compliant to the ELF i386 ABI.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
+ point runs, most registers' values are unspecified, except for:
+
+ %edx Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ %esp The stack contains the arguments and environment:
+ 0(%esp) argc
+ 4(%esp) argv[0]
+ ...
+ (4*argc)(%esp) NULL
+ (4*(argc+1))(%esp) envp[0]
+ ...
+ NULL
+*/
+
+#include "bp-sym.h"
+
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* Clear the frame pointer. The ABI suggests this be done, to mark
+ the outermost frame obviously. */
+ xorl %ebp, %ebp
+
+ /* Extract the arguments as encoded on the stack and set up
+ the arguments for `main': argc, argv. envp will be determined
+ later in __libc_start_main. */
+ popl %esi /* Pop the argument count. */
+ movl %esp, %ecx /* argv starts just at the current stack top.*/
+
+ /* Before pushing the arguments align the stack to a 16-byte
+ (SSE needs 16-byte alignment) boundary to avoid penalties from
+ misaligned accesses. Thanks to Edward Seidl <seidl@janed.com>
+ for pointing this out. */
+ andl $0xfffffff0, %esp
+ pushl %eax /* Push garbage because we allocate
+ 28 more bytes. */
+
+ /* Provide the highest stack address to the user code (for stacks
+ which grow downwards). */
+ pushl %esp
+
+ pushl %edx /* Push address of the shared library
+ termination function. */
+
+#ifdef SHARED
+ /* Load PIC register. */
+ call 1f
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+
+ /* Push address of our own entry points to .fini and .init. */
+ leal __libc_csu_fini@GOTOFF(%ebx), %eax
+ pushl %eax
+ leal __libc_csu_init@GOTOFF(%ebx), %eax
+ pushl %eax
+
+ pushl %ecx /* Push second argument: argv. */
+ pushl %esi /* Push first argument: argc. */
+
+ pushl BP_SYM (main)@GOT(%ebx)
+
+ /* Call the user's main function, and exit with its value.
+ But let the libc call main. */
+ call BP_SYM (__libc_start_main)@PLT
+#else
+ /* Push address of our own entry points to .fini and .init. */
+ pushl $__libc_csu_fini
+ pushl $__libc_csu_init
+
+ pushl %ecx /* Push second argument: argv. */
+ pushl %esi /* Push first argument: argc. */
+
+ pushl $BP_SYM (main)
+
+ /* Call the user's main function, and exit with its value.
+ But let the libc call main. */
+ call BP_SYM (__libc_start_main)
+#endif
+
+ hlt /* Crash if somehow `exit' does return. */
+
+#ifdef SHARED
+1: movl (%esp), %ebx
+ ret
+#endif
+
+/* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so
+ meaningless since we don't support machines < 80386. */
+ .section .rodata
+ .globl _fp_hw
+_fp_hw: .long 3
+ .size _fp_hw, 4
+ .type _fp_hw,@object
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start

View File

@ -1,36 +0,0 @@
diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/configure glibc-2.3.3/sysdeps/unix/sysv/linux/configure
--- glibc-2.3.3.old/sysdeps/unix/sysv/linux/configure 2004-09-06 12:33:39.320387104 -0400
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/configure 2004-09-06 12:34:42.575770824 -0400
@@ -224,29 +224,13 @@
# in /lib and /etc.
case "$prefix" in
/usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
- case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
- mips/mips64/n64/* )
- libc_cv_slibdir="/lib64"
+ libc_cv_slibdir="/@GENTOO_LIBDIR@"
if test "$libdir" = '${exec_prefix}/lib'; then
- libdir='${exec_prefix}/lib64';
+ libdir='${exec_prefix}/@GENTOO_LIBDIR@'
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
- ;;
- mips/mips64/n32/* )
- libc_cv_slibdir="/lib32"
- if test "$libdir" = '${exec_prefix}/lib'; then
- libdir='${exec_prefix}/lib32';
- # Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
- fi
- ;;
- *)
- libc_cv_slibdir="/lib"
- ;;
- esac
+
# Allow the user to override the path with --sysconfdir
if test $sysconfdir = '${prefix}/etc'; then
libc_cv_sysconfdir=/etc

View File

@ -1,95 +0,0 @@
diff -Nru glibc-2.3.3.old/elf/rtld.c glibc-2.3.3/elf/rtld.c
--- glibc-2.3.3.old/elf/rtld.c 2004-09-16 15:02:16.000000000 -0400
+++ glibc-2.3.3/elf/rtld.c 2004-09-16 15:04:58.000000000 -0400
@@ -2041,6 +2041,30 @@
GLRO(dl_profile_output)
= &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0];
+ /* Extra security for SUID binaries. Remove all dangerous environment
+ variables. */
+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
+ {
+ static const char unsecure_envvars[] =
+#ifdef EXTRA_UNSECURE_ENVVARS
+ EXTRA_UNSECURE_ENVVARS
+#endif
+ UNSECURE_ENVVARS;
+ const char *nextp;
+
+ nextp = unsecure_envvars;
+ do
+ {
+ unsetenv (nextp);
+ /* We could use rawmemchr but this need not be fast. */
+ nextp = (char *) (strchr) (nextp, '\0') + 1;
+ }
+ while (*nextp != '\0');
+
+ if (__access ("/etc/suid-debug", F_OK) != 0)
+ unsetenv ("MALLOC_CHECK_");
+ }
+
while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
{
size_t len = 0;
@@ -2188,33 +2212,10 @@
/* The caller wants this information. */
*modep = mode;
- /* Extra security for SUID binaries. Remove all dangerous environment
- variables. */
- if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
- {
- static const char unsecure_envvars[] =
-#ifdef EXTRA_UNSECURE_ENVVARS
- EXTRA_UNSECURE_ENVVARS
-#endif
- UNSECURE_ENVVARS;
- const char *nextp;
-
- nextp = unsecure_envvars;
- do
- {
- unsetenv (nextp);
- /* We could use rawmemchr but this need not be fast. */
- nextp = (char *) (strchr) (nextp, '\0') + 1;
- }
- while (*nextp != '\0');
-
- if (__access ("/etc/suid-debug", F_OK) != 0)
- unsetenv ("MALLOC_CHECK_");
- }
/* If we have to run the dynamic linker in debugging mode and the
LD_DEBUG_OUTPUT environment variable is given, we write the debug
messages to this file. */
- else if (any_debug && debug_output != NULL)
+ if (any_debug && debug_output != NULL)
{
#ifdef O_NOFOLLOW
const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW;
diff -Nru glibc-2.3.3.old/malloc/malloc.c glibc-2.3.3/malloc/malloc.c
--- glibc-2.3.3.old/malloc/malloc.c 2004-09-16 15:03:22.000000000 -0400
+++ glibc-2.3.3/malloc/malloc.c 2004-09-16 15:04:58.000000000 -0400
@@ -321,6 +321,10 @@
#define assert(x) ((void)0)
#endif
+#include <abort-instr.h>
+#ifndef ABORT_INSTRUCTION
+#define ABORT_INSTRUCTION
+#endif
/*
INTERNAL_SIZE_T is the word-size used for internal bookkeeping
diff -Nru glibc-2.3.3.old/sysdeps/generic/unsecvars.h glibc-2.3.3/sysdeps/generic/unsecvars.h
--- glibc-2.3.3.old/sysdeps/generic/unsecvars.h 2004-09-16 15:03:11.000000000 -0400
+++ glibc-2.3.3/sysdeps/generic/unsecvars.h 2004-09-16 15:04:58.000000000 -0400
@@ -3,6 +3,8 @@
with a '\0' explicitly. */
#define UNSECURE_ENVVARS \
"LD_PRELOAD\0" \
+ "LD_DEBUG\0" \
+ "LD_TRACE_PRELINKING\0" \
"LD_LIBRARY_PATH\0" \
"LD_ORIGIN_PATH\0" \
"LD_DEBUG_OUTPUT\0" \

View File

@ -1,231 +0,0 @@
diff -u -p -r1.83 kernel-features.h
--- sysdeps/unix/sysv/linux/kernel-features.h 26 Jan 2005 20:01:10 -0000 1.83
+++ sysdeps/unix/sysv/linux/kernel-features.h 18 Feb 2005 06:21:10 -0000
@@ -413,6 +413,11 @@
# define __ASSUME_GETDENTS32_D_TYPE 1
#endif
+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */
+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
+# define __ASSUME_STAT64_SYSCALL 1
+#endif
+
/* Starting with version 2.5.3, the initial location returned by `brk'
after exec is always rounded up to the next page. */
#if __LINUX_KERNEL_VERSION >= 132355
diff -u -p -r1.1 fxstat.c
--- sysdeps/unix/sysv/linux/alpha/fxstat.c 11 Mar 2004 02:58:44 -0000 1.1
+++ sysdeps/unix/sysv/linux/alpha/fxstat.c 18 Feb 2005 06:21:10 -0000
@@ -1,5 +1,5 @@
/* fxstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,27 +35,39 @@ int
__fxstat (int vers, int fd, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_fstat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__fxstat)
diff -u -p -r1.1 lxstat.c
--- sysdeps/unix/sysv/linux/alpha/lxstat.c 11 Mar 2004 02:58:44 -0000 1.1
+++ sysdeps/unix/sysv/linux/alpha/lxstat.c 18 Feb 2005 06:21:10 -0000
@@ -1,5 +1,5 @@
/* lxstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,27 +35,39 @@ int
__lxstat (int vers, const char *name, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_lstat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__lxstat)
diff -u -p -r1.1 xstat.c
--- sysdeps/unix/sysv/linux/alpha/xstat.c 11 Mar 2004 02:58:44 -0000 1.1
+++ sysdeps/unix/sysv/linux/alpha/xstat.c 18 Feb 2005 06:21:10 -0000
@@ -1,5 +1,5 @@
/* xstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,27 +35,39 @@ int
__xstat (int vers, const char *name, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_stat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__xstat)
diff -u -p -r1.6 xstatconv.c
--- sysdeps/unix/sysv/linux/alpha/xstatconv.c 11 Mar 2004 02:58:44 -0000 1.6
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.c 26 Feb 2005 13:58:07 -0000
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,14 @@
#include <sys/stat.h>
#include <kernel_stat.h>
#include <xstatconv.h>
+#include <sys/syscall.h>
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
int __libc_missing_axp_stat64;
+# endif
+#endif
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
diff -u -p -r1.1 xstatconv.h
--- sysdeps/unix/sysv/linux/alpha/xstatconv.h 11 Mar 2004 02:58:44 -0000 1.1
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.h 26 Feb 2005 13:58:07 -0000
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,12 @@
02111-1307 USA. */
#include "kernel-features.h"
+#include <sys/syscall.h>
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
extern int __libc_missing_axp_stat64 attribute_hidden;
+# endif
+#endif
extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
attribute_hidden;

View File

@ -1,33 +0,0 @@
# /etc/host.conf:
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.4/host.conf,v 1.2 2004/11/24 05:31:58 vapier Exp $
# The file /etc/host.conf contains configuration information specific to
# the resolver library. It should contain one configuration keyword per
# line, followed by appropriate configuration information. The keywords
# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
# This keyword specifies how host lookups are to be performed. It
# should be followed by one or more lookup methods, separated by
# commas. Valid methods are bind, hosts, and nis.
#
order hosts, bind
# Valid values are on and off. If set to on, the resolv+ library treats
# the .local top level domain as link-local domain and sends multicast
# DNS requests to the multicast address 224.0.0.251 port 5353 instead
# of normal DNS requests. If you already use the .local domain in your
# nameserver configuration you will have to switch this option off.
#
mdns off
# Valid values are on and off. If set to on, the resolv+ library
# will return all valid addresses for a host that appears in the
# /etc/hosts file, instead of only the first. This is off by
# default, as it may cause a substantial performance loss at sites
# with large hosts files.
#
multi off

View File

@ -1,44 +0,0 @@
PIE support is broken on PARISC in this glibc so make sure we dont force
building nscd as a PIE or bad things happen.
--- nscd/Makefile
+++ nscd/Makefile
@@ -35,7 +35,7 @@
ifeq ($(have-thread-library),yes)
others := nscd_nischeck
-ifneq (yesyes,$(have-fpie)$(build-shared))
+ifneq (yes,$(build-shared))
others += nscd
endif
install-sbin := nscd nscd_nischeck
@@ -60,27 +60,10 @@
CFLAGS-nscd_getgr_r.c = -fexceptions
CFLAGS-nscd_gethst_r.c = -fexceptions
-ifeq (yesyes,$(have-fpie)$(build-shared))
-CFLAGS-nscd.c = -fpie
-CFLAGS-connections.c = -fpie
-CFLAGS-pwdcache.c = -fpie
-CFLAGS-getpwnam_r.c = -fpie
-CFLAGS-getpwuid_r.c = -fpie
-CFLAGS-grpcache.c = -fpie
-CFLAGS-getgrnam_r.c = -fpie
-CFLAGS-getgrgid_r.c = -fpie
-CFLAGS-hstcache.c = -fpie
-CFLAGS-gethstbyad_r.c = -fpie
-CFLAGS-gethstbynm2_r.c = -fpie
-CFLAGS-dbg_log.c = -fpie
-CFLAGS-nscd_conf.c = -fpie
-CFLAGS-nscd_stat.c = -fpie
-CFLAGS-cache.c = -fpie
-CFLAGS-xmalloc.c = -fpie
-CFLAGS-xstrdup.c = -fpie
+ifeq (yes,$(build-shared))
$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
- $(LINK.o) -pie -Wl,-O1 \
+ $(LINK.o) -Wl,-O1 \
$(sysdep-LDFLAGS) $(config-LDFLAGS) \
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \

View File

@ -1,102 +0,0 @@
--- config.h.in
+++ config.h.in
@@ -215,4 +215,7 @@
#undef HAVE_LIBIDN
+/* Defined if economical random device is available. */
+#undef HAVE_DEV_ERANDOM
+
/* Define if inlined system calls are available. */
#undef HAVE_INLINED_SYSCALLS
--- configure.in
+++ configure.in
@@ -264,4 +264,11 @@
AC_SUBST(all_warnings)
+dnl See whether the user wants to disable checking for /dev/erandom
+AC_ARG_ENABLE([dev-erandom],
+ AC_HELP_STRING([--disable-dev-erandom],
+ [disable testing for /dev/erandom]),
+ [try_dev_erandom=$enableval],
+ [try_dev_erandom=yes])
+
AC_CANONICAL_HOST
@@ -1974,4 +1981,19 @@
AC_SUBST(sizeof_long_double)
+dnl check whether we have an economical random device
+if test "$try_dev_erandom" = yes ; then
+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
+ [if test -r "/dev/erandom" ; then
+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
+ if test "$ac_cv_have_dev_erandom" = yes; then
+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
+ [defined if the system supports an economical random device])
+ fi
+else
+ AC_MSG_CHECKING(for economical random device)
+ ac_cv_have_dev_erandom=no
+ AC_MSG_RESULT(has been disabled)
+fi
+
### End of automated tests.
### Now run sysdeps configure fragments.
--- configure
+++ configure
@@ -884,6 +884,7 @@
--enable-kernel=VERSION compile for compatibility with kernel not older than
VERSION
--enable-all-warnings enable all useful warnings gcc can issue
+ --disable-dev-erandom disable testing for /dev/erandom
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1697,6 +1698,14 @@
fi;
+# Check whether --enable-dev-erandom or --disable-dev-erandom was given.
+if test "${enable_dev_erandom+set}" = set; then
+ enableval="$enable_dev_erandom"
+ try_dev_erandom=$enableval
+else
+ try_dev_erandom=yes
+fi;
+
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
@@ -7449,6 +7458,32 @@
sizeof_long_double=$ac_cv_sizeof_long_double
+if test "$try_dev_erandom" = yes ; then
+ echo "$as_me:$LINENO: checking for economical random device" >&5
+echo $ECHO_N "checking for economical random device... $ECHO_C" >&6
+if test "${ac_cv_have_dev_random+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -r "/dev/erandom" ; then
+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_dev_random" >&5
+echo "${ECHO_T}$ac_cv_have_dev_random" >&6
+ if test "$ac_cv_have_dev_erandom" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_ERANDOM 1
+_ACEOF
+
+ fi
+else
+ echo "$as_me:$LINENO: checking for economical random device" >&5
+echo $ECHO_N "checking for economical random device... $ECHO_C" >&6
+ ac_cv_have_dev_erandom=no
+ echo "$as_me:$LINENO: result: has been disabled" >&5
+echo "${ECHO_T}has been disabled" >&6
+fi
+
### End of automated tests.
### Now run sysdeps configure fragments.

View File

@ -1,138 +0,0 @@
The configure check for SSP is taken from glibc HEAD.
diff -ur glibc-2.3.5-orig/config.make.in glibc-2.3.5/config.make.in
--- glibc-2.3.5-orig/config.make.in 2006-01-18 00:31:17.000000000 -0500
+++ glibc-2.3.5/config.make.in 2006-01-18 00:33:25.000000000 -0500
@@ -61,6 +61,7 @@
have-selinux = @have_selinux@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
fno-unit-at-a-time = @fno_unit_at_a_time@
+have-ssp = @libc_cv_ssp@
bind-now = @bindnow@
static-libgcc = @libc_cv_gcc_static_libgcc@
diff -ur glibc-2.3.5-orig/configure glibc-2.3.5/configure
--- glibc-2.3.5-orig/configure 2006-01-18 00:31:17.000000000 -0500
+++ glibc-2.3.5/configure 2006-01-18 00:35:54.000000000 -0500
@@ -313,7 +313,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5785,6 +5785,33 @@
fi
+echo "$as_me:$LINENO: checking for -fstack-protector" >&5
+echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
+if test "${libc_cv_ssp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
+ -o conftest conftest.c 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+then
+ libc_cv_ssp=yes
+else
+ libc_cv_ssp=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
+echo "${ECHO_T}$libc_cv_ssp" >&6
+
+
if test $elf != yes; then
echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
@@ -8424,6 +8451,7 @@
s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
s,@libc_cv_fpie@,$libc_cv_fpie,;t t
s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
+s,@libc_cv_ssp@,$libc_cv_ssp,;t t
s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
s,@no_whole_archive@,$no_whole_archive,;t t
diff -ur glibc-2.3.5-orig/configure.in glibc-2.3.5/configure.in
--- glibc-2.3.5-orig/configure.in 2006-01-18 00:31:17.000000000 -0500
+++ glibc-2.3.5/configure.in 2006-01-18 00:35:50.000000000 -0500
@@ -1500,6 +1500,21 @@
fi
AC_SUBST(fno_unit_at_a_time)
+AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
+cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
+ -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_ssp=yes
+else
+ libc_cv_ssp=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_ssp)
+
if test $elf != yes; then
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
[AC_TRY_COMPILE(, [asm (".section .init");
diff -ur glibc-2.3.5-orig/sysdeps/generic/libc-start.c glibc-2.3.5/sysdeps/generic/libc-start.c
--- glibc-2.3.5-orig/sysdeps/generic/libc-start.c 2006-01-18 00:31:35.000000000 -0500
+++ glibc-2.3.5/sysdeps/generic/libc-start.c 2006-01-18 00:30:39.000000000 -0500
@@ -188,6 +188,9 @@
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
+
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;
diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.5/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Dist 2006-01-18 00:31:35.000000000 -0500
+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Dist 2006-01-18 00:30:39.000000000 -0500
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Makefile 2006-01-18 00:31:35.000000000 -0500
+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile 2006-01-18 00:33:03.000000000 -0500
@@ -1,5 +1,8 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
+ifeq (yes,$(have-ssp))
+CFLAGS-ssp.c += -fno-stack-protector
+endif
endif
ifeq ($(subdir),assert)
diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.5/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Versions 2006-01-18 00:31:35.000000000 -0500
+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Versions 2006-01-18 00:30:39.000000000 -0500
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_2.3.3 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;

View File

@ -1,155 +0,0 @@
/*
* Distributed under the terms of the GNU General Public License v2
* $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.5/ssp.c,v 1.3 2005/06/07 01:38:58 vapier Exp $
*
* This is a modified version of Hiroaki Etoh's stack smashing routines
* implemented for glibc.
*
* The following people have contributed input to this code.
* Ned Ludd - <solar[@]gentoo.org>
* Alexander Gabert - <pappy[@]gentoo.org>
* The PaX Team - <pageexec[@]freemail.hu>
* Peter S. Mazinger - <ps.m[@]gmx.net>
* Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
* Robert Connolly - <robert[@]linuxfromscratch.org>
* Cory Visi <cory@visi.name>
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef __SSP__
# error ssp.c has to be built w/ -fno-stack-protector
#endif
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/syslog.h>
#include <sys/time.h>
#ifdef __SSP_USE_ERANDOM__
# include <sys/sysctl.h>
#endif
#ifdef __PROPOLICE_BLOCK_SEGV__
# define SSP_SIGTYPE SIGSEGV
#elif __PROPOLICE_BLOCK_KILL__
# define SSP_SIGTYPE SIGKILL
#else
# define SSP_SIGTYPE SIGABRT
#endif
unsigned long __guard = 0UL;
/* Use of __* functions from the rest of glibc here avoids
* initialisation problems for executables preloaded with
* libraries that overload the associated standard library
* functions.
*/
#ifdef __UCLIBC__
extern int __libc_open(__const char *file, int flags, ...);
extern ssize_t __libc_read(int fd, void *buf, size_t count);
extern int __libc_close(int fd);
#else
# define __libc_open(file, flags) __open(file, flags)
# define __libc_read(fd, buf, count) __read(fd, buf, count)
# define __libc_close(fd) __close(fd)
# define __libc_write(fd, buf, count) __write(fd, buf, count)
#endif
void __guard_setup(void) __attribute__ ((constructor));
void __guard_setup(void)
{
size_t size;
if (__guard != 0UL)
return;
/* Start with the "terminator canary". */
__guard = 0xFF0A0D00UL;
#ifndef __SSP_QUICK_CANARY__
# ifdef __SSP_USE_ERANDOM__
{
int mib[3];
/* Random is another depth in Linux, hence an array of 3. */
mib[0] = CTL_KERN;
mib[1] = KERN_RANDOM;
mib[2] = RANDOM_ERANDOM;
size = sizeof(unsigned long);
if (__sysctl(mib, 3, &__guard, &size, NULL, 0) != (-1))
if (__guard != 0UL)
return;
}
# endif /* ifdef __SSP_USE_ERANDOM__ */
/*
* Attempt to open kernel pseudo random device if one exists before
* opening urandom to avoid system entropy depletion.
*/
{
int fd;
# ifdef __SSP_USE_ERANDOM__
if ((fd = __libc_open("/dev/erandom", O_RDONLY)) == (-1))
# endif
fd = __libc_open("/dev/urandom", O_RDONLY);
if (fd != (-1)) {
size = __libc_read(fd, (char *) &__guard, sizeof(__guard));
__libc_close(fd);
if (size == sizeof(__guard))
return;
}
}
#endif /* ifndef __SSP_QUICK_CANARY__ */
/* Everything failed? Or we are using a weakened model of the
* terminator canary */
{
struct timeval tv;
__gettimeofday(&tv, NULL);
__guard ^= tv.tv_usec ^ tv.tv_sec;
}
}
void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
void __stack_smash_handler(char func[], int damaged)
{
extern char *__progname;
const char message[] = ": stack smashing attack in function ";
struct sigaction sa;
sigset_t mask;
sigfillset(&mask);
sigdelset(&mask, SSP_SIGTYPE); /* Block all signal handlers */
sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */
/* Print error message to stderr and syslog */
#if 1 /* syslog() causes issues with glibc #94325 */
__libc_write(STDERR_FILENO, __progname, strlen(__progname));
__libc_write(STDERR_FILENO, message, strlen(message));
__libc_write(STDERR_FILENO, func, strlen(func));
__libc_write(STDERR_FILENO, "()\n", 3);
//_syscall3(int, _ssp_syslog, int, type, char *, bufp, int, len)
//_ssp_syslog(LOG_INFO,
#else
fprintf(stderr, "%s%s%s()\n", __progname, message, func);
syslog(LOG_INFO, "%s%s%s()", __progname, message, func);
#endif
/* Make the default handler associated with the signal handler */
memset(&sa, 0, sizeof(struct sigaction));
sigfillset(&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigaction(SSP_SIGTYPE, &sa, NULL);
(void) kill(getpid(), SSP_SIGTYPE);
_exit(127);
}

View File

@ -1,138 +0,0 @@
The configure check for SSP was taken from glibc HEAD
diff -ur glibc-2.3.6-orig/config.make.in glibc-2.3.6/config.make.in
--- glibc-2.3.6-orig/config.make.in 2006-01-17 14:22:02.000000000 -0500
+++ glibc-2.3.6/config.make.in 2006-01-17 14:22:39.000000000 -0500
@@ -62,6 +62,7 @@
have-libaudit = @have_libaudit@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
fno-unit-at-a-time = @fno_unit_at_a_time@
+have-ssp = @libc_cv_ssp@
bind-now = @bindnow@
static-libgcc = @libc_cv_gcc_static_libgcc@
diff -ur glibc-2.3.6-orig/configure glibc-2.3.6/configure
--- glibc-2.3.6-orig/configure 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/configure 2006-01-17 14:18:24.000000000 -0500
@@ -313,7 +313,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5785,6 +5785,33 @@
fi
+echo "$as_me:$LINENO: checking for -fstack-protector" >&5
+echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
+if test "${libc_cv_ssp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
+ -o conftest conftest.c 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+then
+ libc_cv_ssp=yes
+else
+ libc_cv_ssp=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
+echo "${ECHO_T}$libc_cv_ssp" >&6
+
+
if test $elf != yes; then
echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
@@ -8504,6 +8531,7 @@
s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
s,@libc_cv_fpie@,$libc_cv_fpie,;t t
s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
+s,@libc_cv_ssp@,$libc_cv_ssp,;t t
s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
s,@no_whole_archive@,$no_whole_archive,;t t
diff -ur glibc-2.3.6-orig/configure.in glibc-2.3.6/configure.in
--- glibc-2.3.6-orig/configure.in 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/configure.in 2006-01-17 14:18:24.000000000 -0500
@@ -1500,6 +1500,21 @@
fi
AC_SUBST(fno_unit_at_a_time)
+AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
+cat > conftest.c <<EOF
+int foo;
+main () { return 0;}
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
+ -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_ssp=yes
+else
+ libc_cv_ssp=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_ssp)
+
if test $elf != yes; then
AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
[AC_TRY_COMPILE(, [asm (".section .init");
diff -ur glibc-2.3.6-orig/sysdeps/generic/libc-start.c glibc-2.3.6/sysdeps/generic/libc-start.c
--- glibc-2.3.6-orig/sysdeps/generic/libc-start.c 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/sysdeps/generic/libc-start.c 2006-01-17 14:18:24.000000000 -0500
@@ -188,6 +188,9 @@
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
+ /* call the __guard_setup to set up the random __guard value */
+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
+
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;
diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.6/sysdeps/unix/sysv/linux/Dist
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Dist 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Dist 2006-01-17 14:18:24.000000000 -0500
@@ -1,3 +1,4 @@
+ssp.c
bits/initspin.h
cmsg_nxthdr.c
dl-brk.c
diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.6/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Makefile 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Makefile 2006-01-17 14:18:24.000000000 -0500
@@ -1,5 +1,8 @@
ifeq ($(subdir),csu)
-sysdep_routines += errno-loc
+sysdep_routines += errno-loc ssp
+ifeq (yes,$(have-ssp))
+CFLAGS-ssp.c += -fno-stack-protector
+endif
endif
ifeq ($(subdir),assert)
diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.6/sysdeps/unix/sysv/linux/Versions
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Versions 2006-01-17 14:22:17.000000000 -0500
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Versions 2006-01-17 14:18:24.000000000 -0500
@@ -108,6 +108,8 @@
GLIBC_2.3.2 {
# New kernel interfaces.
epoll_create; epoll_ctl; epoll_wait;
+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
+ __guard; __guard_setup; __stack_smash_handler;
}
GLIBC_2.3.3 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;

View File

@ -1,24 +0,0 @@
# /etc/host.conf:
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.6/host.conf,v 1.1 2006/02/21 23:35:21 vapier Exp $
# The file /etc/host.conf contains configuration information specific to
# the resolver library. It should contain one configuration keyword per
# line, followed by appropriate configuration information. The keywords
# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
# This keyword specifies how host lookups are to be performed. It
# should be followed by one or more lookup methods, separated by
# commas. Valid methods are bind, hosts, and nis.
#
order hosts, bind
# Valid values are on and off. If set to on, the resolv+ library
# will return all valid addresses for a host that appears in the
# /etc/hosts file, instead of only the first. This is off by
# default, as it may cause a substantial performance loss at sites
# with large hosts files.
#
multi off

View File

@ -1,28 +0,0 @@
--- glibc-2.4/sysdeps/unix/sysv/linux/configure
+++ glibc-2.4/sysdeps/unix/sysv/linux/configure
@@ -224,23 +224,12 @@
# in /lib and /etc.
case "$prefix" in
/usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
- # and libc_cv_localedir.
- test -n "$libc_cv_slibdir" || \
- case $machine in
- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
- libc_cv_slibdir="/lib64"
+ libc_cv_slibdir="/@GENTOO_LIBDIR@"
if test "$libdir" = '${exec_prefix}/lib'; then
- libdir='${exec_prefix}/lib64';
+ libdir='${exec_prefix}/@GENTOO_LIBDIR@'
# Locale data can be shared between 32bit and 64bit libraries
libc_cv_localedir='${exec_prefix}/lib/locale'
fi
- ;;
- *)
- libc_cv_slibdir="/lib"
- ;;
- esac
# Allow the user to override the path with --sysconfdir
if test $sysconfdir = '${prefix}/etc'; then
libc_cv_sysconfdir=/etc

View File

@ -1,25 +0,0 @@
/*
* Just do:
* # gcc -fno-stack-protector -s -shared -fPIC ssp_simple.c -o /lib/libssp_simple.so
* # echo '/lib/libssp_simple.so' > /etc/ld.so.preload
* # emerge glibc
* # rm -f /lib/libssp_simple.so /etc/ld.so.preload
*/
#include <syslog.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/sysctl.h>
unsigned long __guard = 0UL; static void __guard_setup(void) __attribute__ ((constructor));
void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
static void __guard_setup(void) { if (__guard != 0UL) return; __guard = 0xFF0A0D00UL; }
void __stack_smash_handler(char func[], int damaged) {
syslog(LOG_CRIT, "stack overflow in function %s(); %s=%p __guard_setup=%p __guard=%p " \
"PPID=%d PID=%d UID=%d EUID=%d GID=%d EGID=%d",
func, func, __guard_setup, __guard,
getppid(), getpid(), getuid(), geteuid(), getgid(), getegid());
_exit(127);
}

View File

@ -1,311 +0,0 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* Copyright (C) 2006 Gentoo Foundation Inc.
* License terms as above.
*
* Hardened Gentoo SSP handler
*
* An SSP failure handler that does not use functions from the rest of
* glibc; it uses the INTERNAL_SYSCALL methods directly. This ensures
* no possibility of recursion into the handler.
*
* Direct all bug reports to http://bugs.gentoo.org/
*
* Re-written from the glibc-2.3 Hardened Gentoo SSP handler
* by Kevin F. Quinn - <kevquinn[@]gentoo.org>
*
* The following people contributed to the glibc-2.3 Hardened
* Gentoo SSP handler, from which this implementation draws much:
*
* Ned Ludd - <solar[@]gentoo.org>
* Alexander Gabert - <pappy[@]gentoo.org>
* The PaX Team - <pageexec[@]freemail.hu>
* Peter S. Mazinger - <ps.m[@]gmx.net>
* Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
* Robert Connolly - <robert[@]linuxfromscratch.org>
* Cory Visi <cory[@]visi.name>
* Mike Frysinger <vapier[@]gentoo.org>
*/
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <kernel-features.h>
#include <alloca.h>
/* from sysdeps */
#include <socketcall.h>
/* for the stuff in bits/socket.h */
#include <sys/socket.h>
#include <sys/un.h>
/* Sanity check on SYSCALL macro names - force compilation
* failure if the names used here do not exist
*/
#if !defined __NR_socketcall && !defined __NR_socket
# error Cannot do syscall socket or socketcall
#endif
#if !defined __NR_socketcall && !defined __NR_connect
# error Cannot do syscall connect or socketcall
#endif
#ifndef __NR_write
# error Cannot do syscall write
#endif
#ifndef __NR_close
# error Cannot do syscall close
#endif
#ifndef __NR_getpid
# error Cannot do syscall getpid
#endif
#ifndef __NR_kill
# error Cannot do syscall kill
#endif
#ifndef __NR_exit
# error Cannot do syscall exit
#endif
#ifdef SSP_SMASH_DUMPS_CORE
# if !defined _KERNEL_NSIG && !defined _NSIG
# error No _NSIG or _KERNEL_NSIG for rt_sigaction
# endif
# if !defined __NR_sigation && !defined __NR_rt_sigaction
# error Cannot do syscall sigaction or rt_sigaction
# endif
#endif
/* Define DO_SOCKET/DO_CONNECT macros to deal with socketcall vs socket/connect */
#ifdef __NR_socketcall
# define DO_SOCKET(result,domain,type,protocol) \
{socketargs[0] = domain; \
socketargs[1] = type; \
socketargs[2] = protocol; \
socketargs[3] = 0; \
result = INLINE_SYSCALL(socketcall,2,SOCKOP_socket,socketargs);}
# define DO_CONNECT(result,sockfd,serv_addr,addrlen) \
{socketargs[0] = sockfd; \
socketargs[1] = (unsigned long int)serv_addr; \
socketargs[2] = addrlen; \
socketargs[3] = 0; \
result = INLINE_SYSCALL(socketcall,2,SOCKOP_connect,socketargs);}
#else
# define DO_SOCKET(result,domain,type,protocol) \
{result = INLINE_SYSCALL(socket,3,domain,type,protocol);}
# define DO_CONNECT(result,sockfd,serv_addr,addrlen) \
{result = INLINE_SYSCALL(connect,3,sockfd,serv_addr,addrlen);}
#endif
/* __NR_socketcall */
#ifndef _PATH_LOG
# define _PATH_LOG "/dev/log"
#endif
static const char path_log[]=_PATH_LOG;
/* For building glibc with SSP switched on, define __progname to a
* constant if building for the run-time loader, to avoid pulling
* in more of libc.so into ld.so
*/
#ifdef IS_IN_rtld
static char *__progname = "<rtld>";
#else
extern char *__progname;
#endif
/* Common handler code, used by stack_chk_fail and __stack_smash_handler
* Inlined to ensure no self-references to the handler within itself.
* Data static to avoid putting more than necessary on the stack,
* to aid core debugging.
*/
static inline void
__attribute__ ((__noreturn__ , __always_inline__))
__hardened_gentoo_stack_chk_fail (char func[], int damaged)
{
#define MESSAGE_BUFSIZ 256
static pid_t pid;
static int plen, i;
static char message[MESSAGE_BUFSIZ];
static const char msg_ssa[]=": stack smashing attack";
static const char msg_inf[]=" in function ";
static const char msg_ssd[]="*** stack smashing detected ***: ";
static const char msg_terminated[]=" - terminated\n";
static const char msg_report[]="Report to http://bugs.gentoo.org/\n";
static const char msg_unknown[]="<unknown>";
#ifdef SSP_SMASH_DUMPS_CORE
static struct sigaction default_abort_act;
#endif
static int log_socket, connect_result;
static struct sockaddr_un sock;
#ifdef __NR_socketcall
static unsigned long int socketargs[4];
#endif
/* Build socket address
*/
sock.sun_family = AF_UNIX;
i=0;
while ((path_log[i] != '\0') && (i<(sizeof(sock.sun_path)-1)))
{
sock.sun_path[i]=path_log[i];
i++;
}
sock.sun_path[i]='\0';
/* Try SOCK_DGRAM connection to syslog */
connect_result=-1;
DO_SOCKET(log_socket,AF_UNIX,SOCK_DGRAM,0);
if (log_socket != -1)
DO_CONNECT(connect_result,log_socket,(&sock),(sizeof(sock)));
if (connect_result == -1)
{
if (log_socket != -1)
INLINE_SYSCALL(close,1,log_socket);
/* Try SOCK_STREAM connection to syslog */
DO_SOCKET(log_socket,AF_UNIX,SOCK_STREAM,0);
if (log_socket != -1)
DO_CONNECT(connect_result,log_socket,(&sock),(sizeof(sock)));
}
/* Build message. Messages are generated both in the old style and new style,
* so that log watchers that are configured for the old-style message continue
* to work.
*/
#define strconcat(str) \
{i=0; while ((str[i] != '\0') && ((i+plen)<(MESSAGE_BUFSIZ-1))) \
{\
message[plen+i]=str[i];\
i++;\
}\
plen+=i;}
/* R.Henderson post-gcc-4 style message */
plen=0;
strconcat(msg_ssd);
if (__progname != (char *)0)
strconcat(__progname)
else
strconcat(msg_unknown);
strconcat(msg_terminated);
/* Write out error message to STDERR, to syslog if open */
INLINE_SYSCALL(write,3,STDERR_FILENO,message,plen);
if (connect_result != -1)
INLINE_SYSCALL(write,3,log_socket,message,plen);
/* Dr. Etoh pre-gcc-4 style message */
plen=0;
if (__progname != (char *)0)
strconcat(__progname)
else
strconcat(msg_unknown);
strconcat(msg_ssa);
strconcat(msg_inf);
if (func!=NULL)
strconcat(func)
else
strconcat(msg_unknown);
strconcat(msg_terminated);
/* Write out error message to STDERR, to syslog if open */
INLINE_SYSCALL(write,3,STDERR_FILENO,message,plen);
if (connect_result != -1)
INLINE_SYSCALL(write,3,log_socket,message,plen);
/* Direct reports to bugs.gentoo.org */
plen=0;
strconcat(msg_report);
message[plen++]='\0';
/* Write out error message to STDERR, to syslog if open */
INLINE_SYSCALL(write,3,STDERR_FILENO,message,plen);
if (connect_result != -1)
INLINE_SYSCALL(write,3,log_socket,message,plen);
if (log_socket != -1)
INLINE_SYSCALL(close,1,log_socket);
/* Suicide */
pid=INLINE_SYSCALL(getpid,0);
#ifdef SSP_SMASH_DUMPS_CORE
/* Remove any user-supplied handler for SIGABRT, before using it */
default_abort_act.sa_handler = SIG_DFL;
default_abort_act.sa_sigaction = NULL;
__sigfillset(&default_abort_act.sa_mask);
default_abort_act.sa_flags = 0;
/* sigaction doesn't exist on amd64; however rt_sigaction seems to
* exist everywhere. rt_sigaction has an extra parameter - the
* size of sigset_t.
*/
# ifdef __NR_sigation
if (INLINE_SYSCALL(sigaction,3,SIGABRT,&default_abort_act,NULL) == 0)
# else
/* Although rt_sigaction expects sizeof(sigset_t) - it expects the size
* of the _kernel_ sigset_t which is not the same as the user sigset_t.
* Most arches have this as _NSIG bits - mips has _KERNEL_NSIG bits for
* some reason.
*/
# ifdef _KERNEL_NSIG
if (INLINE_SYSCALL(rt_sigaction,4,SIGABRT,&default_abort_act,NULL,_KERNEL_NSIG/8) == 0)
# else
if (INLINE_SYSCALL(rt_sigaction,4,SIGABRT,&default_abort_act,NULL,_NSIG/8) == 0)
# endif
# endif
INLINE_SYSCALL(kill,2,pid,SIGABRT);
#endif
/* Note; actions cannot be added to SIGKILL */
INLINE_SYSCALL(kill,2,pid,SIGKILL);
/* In case the kill didn't work, exit anyway
* The loop prevents gcc thinking this routine returns
*/
while (1) INLINE_SYSCALL(exit,0);
}
void
__attribute__ ((__noreturn__))
__stack_chk_fail (void)
{
__hardened_gentoo_stack_chk_fail(NULL,0);
}
#ifdef ENABLE_OLD_SSP_COMPAT
void
__attribute__ ((__noreturn__))
__stack_smash_handler(char func[], int damaged)
{
__hardened_gentoo_stack_chk_fail(func,damaged);
}
#endif

View File

@ -1,29 +0,0 @@
Prevent default-fPIE from confusing configure into thinking
PIC code is default. This causes glibc to build both PIC and
non-PIC code as normal, which on the hardened compiler generates
PIC and PIE.
Patch by Kevin F. Quinn <kevquinn@gentoo.org>
--- configure.in
+++ configure.in
@@ -2145,7 +2145,7 @@
# error PIC is default.
#endif
EOF
-if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then
pic_default=no
fi
rm -f conftest.*])
--- configure
+++ configure
@@ -7698,7 +7698,7 @@
# error PIC is default.
#endif
EOF
-if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then
pic_default=no
fi
rm -f conftest.*

Some files were not shown because too many files have changed in this diff Show More