Print this page
uts: Allow for address space randomisation.
Randomise the base addresses of shared objects, non-fixed mappings, the
stack and the heap. Introduce a service, svc:/system/process-security,
and a tool psecflags(1) to control and observe it
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libc/amd64/Makefile
+++ new/usr/src/lib/libc/amd64/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2015, Joyent, Inc. All rights reserved.
24 24 #
25 25 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
26 26 # Copyright 2013 Garrett D'Amore <garrett@damore.org>
27 27 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
28 28 # Use is subject to license terms.
29 29 #
30 30
31 31 LIBCBASE= .
32 32 LIBCDIR= $(SRC)/lib/libc
33 33 LIBRARY= libc.a
34 34 LIB_PIC= libc_pic.a
35 35 VERS= .1
36 36 CPP= /usr/lib/cpp
37 37 TARGET_ARCH= amd64
38 38
39 39 # objects are grouped by source directory
40 40
41 41 # local objects
42 42 STRETS=
43 43
44 44 CRTOBJS= \
45 45 cerror.o
46 46
47 47 DYNOBJS=
48 48
49 49 FPOBJS= \
50 50 fpgetmask.o \
51 51 fpgetround.o \
52 52 fpsetmask.o \
53 53 fpsetround.o \
54 54 fpstart.o \
55 55 ieee.o
56 56
57 57 I386FPOBJS= \
58 58 _D_cplx_div.o \
59 59 _D_cplx_div_ix.o \
60 60 _D_cplx_div_rx.o \
61 61 _D_cplx_lr_div.o \
62 62 _D_cplx_lr_div_ix.o \
63 63 _D_cplx_lr_div_rx.o \
64 64 _D_cplx_mul.o \
65 65 _F_cplx_div.o \
66 66 _F_cplx_div_ix.o \
67 67 _F_cplx_div_rx.o \
68 68 _F_cplx_lr_div.o \
69 69 _F_cplx_lr_div_ix.o \
70 70 _F_cplx_lr_div_rx.o \
71 71 _F_cplx_mul.o \
72 72 _X_cplx_div.o \
73 73 _X_cplx_div_ix.o \
74 74 _X_cplx_div_rx.o \
75 75 _X_cplx_lr_div.o \
76 76 _X_cplx_lr_div_ix.o \
77 77 _X_cplx_lr_div_rx.o \
78 78 _X_cplx_mul.o
79 79
80 80 FPASMOBJS= \
81 81 __xgetRD.o \
82 82 _xtoll.o \
83 83 _xtoull.o \
84 84 _base_il.o \
85 85 fpcw.o \
86 86 fpgetsticky.o \
87 87 fpsetsticky.o
88 88
89 89 ATOMICOBJS= \
90 90 atomic.o
91 91
92 92 CHACHAOBJS= \
93 93 chacha.o
94 94
95 95 XATTROBJS= \
96 96 xattr_common.o
97 97 COMOBJS= \
98 98 bcmp.o \
99 99 bcopy.o \
100 100 bsearch.o \
101 101 bzero.o \
102 102 qsort.o \
103 103 strtol.o \
104 104 strtoul.o \
105 105 strtoll.o \
106 106 strtoull.o
107 107
108 108 GENOBJS= \
109 109 _getsp.o \
110 110 abs.o \
111 111 alloca.o \
112 112 arc4random.o \
113 113 arc4random_uniform.o \
114 114 attrat.o \
115 115 byteorder.o \
116 116 cuexit.o \
117 117 ecvt.o \
118 118 errlst.o \
119 119 amd64_data.o \
120 120 ldivide.o \
121 121 lock.o \
122 122 makectxt.o \
123 123 memccpy.o \
124 124 memchr.o \
125 125 memcmp.o \
126 126 memcpy.o \
127 127 memset.o \
128 128 new_list.o \
129 129 proc64_id.o \
130 130 proc64_support.o \
131 131 setjmp.o \
132 132 siginfolst.o \
133 133 siglongjmp.o \
134 134 strcmp.o \
135 135 strcpy.o \
136 136 strlen.o \
137 137 strncmp.o \
138 138 strncpy.o \
139 139 strnlen.o \
140 140 sync_instruction_memory.o
141 141
142 142 # Preserved solely to ease maintenance of 32-bit and 64-bit library builds
143 143 # This macro should ALWAYS be empty; native APIs are already 'large file'.
144 144 COMSYSOBJS64=
145 145
146 146 SYSOBJS64=
147 147
148 148 COMSYSOBJS= \
149 149 __clock_timer.o \
150 150 __getloadavg.o \
151 151 __rusagesys.o \
152 152 __signotify.o \
153 153 __sigrt.o \
154 154 __time.o \
155 155 _lgrp_home_fast.o \
156 156 _lgrpsys.o \
157 157 _nfssys.o \
158 158 _portfs.o \
159 159 _pset.o \
160 160 _rpcsys.o \
161 161 _sigaction.o \
162 162 _so_accept.o \
163 163 _so_bind.o \
164 164 _so_connect.o \
165 165 _so_getpeername.o \
166 166 _so_getsockname.o \
167 167 _so_getsockopt.o \
168 168 _so_listen.o \
169 169 _so_recv.o \
170 170 _so_recvfrom.o \
171 171 _so_recvmsg.o \
172 172 _so_send.o \
173 173 _so_sendmsg.o \
174 174 _so_sendto.o \
175 175 _so_setsockopt.o \
176 176 _so_shutdown.o \
177 177 _so_socket.o \
178 178 _so_socketpair.o \
179 179 _sockconfig.o \
180 180 acct.o \
181 181 acl.o \
182 182 adjtime.o \
183 183 alarm.o \
184 184 brk.o \
185 185 chdir.o \
186 186 chroot.o \
187 187 cladm.o \
188 188 close.o \
189 189 execve.o \
190 190 exit.o \
191 191 facl.o \
192 192 fchdir.o \
193 193 fchroot.o \
194 194 fdsync.o \
195 195 fpathconf.o \
196 196 fstatfs.o \
197 197 fstatvfs.o \
198 198 getcpuid.o \
199 199 getdents.o \
200 200 getegid.o \
201 201 geteuid.o \
202 202 getgid.o \
203 203 getgroups.o \
204 204 gethrtime.o \
205 205 getitimer.o \
206 206 getmsg.o \
207 207 getpid.o \
208 208 getpmsg.o \
209 209 getppid.o \
210 210 getrandom.o \
211 211 getrlimit.o \
212 212 getuid.o \
213 213 gtty.o \
214 214 install_utrap.o \
215 215 ioctl.o \
216 216 kaio.o \
217 217 kill.o \
218 218 llseek.o \
219 219 lseek.o \
220 220 mmapobjsys.o \
221 221 memcntl.o \
222 222 mincore.o \
223 223 mmap.o \
224 224 modctl.o \
225 225 mount.o \
226 226 mprotect.o \
227 227 munmap.o \
228 228 nice.o \
229 229 ntp_adjtime.o \
230 230 ntp_gettime.o \
231 231 p_online.o \
232 232 pathconf.o \
↓ open down ↓ |
232 lines elided |
↑ open up ↑ |
233 233 pause.o \
234 234 pcsample.o \
235 235 pipe2.o \
236 236 pollsys.o \
237 237 pread.o \
238 238 preadv.o \
239 239 priocntlset.o \
240 240 processor_bind.o \
241 241 processor_info.o \
242 242 profil.o \
243 + psecflagsset.o \
243 244 putmsg.o \
244 245 putpmsg.o \
245 246 pwrite.o \
246 247 pwritev.o \
247 248 read.o \
248 249 readv.o \
249 250 resolvepath.o \
250 251 seteguid.o \
251 252 setgid.o \
252 253 setgroups.o \
253 254 setitimer.o \
254 255 setreid.o \
255 256 setrlimit.o \
256 257 setuid.o \
257 258 sigaltstk.o \
258 259 sigprocmsk.o \
259 260 sigsendset.o \
260 261 sigsuspend.o \
261 262 statfs.o \
262 263 statvfs.o \
263 264 stty.o \
264 265 sync.o \
265 266 sysconfig.o \
266 267 sysfs.o \
267 268 sysinfo.o \
268 269 syslwp.o \
269 270 times.o \
270 271 ulimit.o \
271 272 umask.o \
272 273 umount2.o \
273 274 utssys.o \
274 275 uucopy.o \
275 276 vhangup.o \
276 277 waitid.o \
277 278 write.o \
278 279 writev.o \
279 280 yield.o
280 281
281 282 SYSOBJS= \
282 283 __clock_gettime.o \
283 284 __getcontext.o \
284 285 __uadmin.o \
285 286 _lwp_mutex_unlock.o \
286 287 _stack_grow.o \
287 288 door.o \
288 289 forkx.o \
289 290 forkallx.o \
290 291 getcontext.o \
291 292 gettimeofday.o \
292 293 lwp_private.o \
293 294 nuname.o \
294 295 syscall.o \
295 296 sysi86.o \
296 297 tls_get_addr.o \
297 298 uadmin.o \
298 299 umount.o \
299 300 uname.o \
300 301 vforkx.o
301 302
302 303 # Preserved solely to ease maintenance of 32-bit and 64-bit library builds
303 304 # This macro should ALWAYS be empty; native APIs are already 'large file'.
304 305 PORTGEN64=
305 306
306 307 # objects from source under $(LIBCDIR)/port
307 308 PORTFP= \
308 309 __flt_decim.o \
309 310 __flt_rounds.o \
310 311 __tbl_10_b.o \
311 312 __tbl_10_h.o \
312 313 __tbl_10_s.o \
313 314 __tbl_2_b.o \
314 315 __tbl_2_h.o \
315 316 __tbl_2_s.o \
316 317 __tbl_fdq.o \
317 318 __tbl_tens.o \
318 319 __x_power.o \
319 320 _base_sup.o \
320 321 aconvert.o \
321 322 decimal_bin.o \
322 323 double_decim.o \
323 324 econvert.o \
324 325 fconvert.o \
325 326 file_decim.o \
326 327 finite.o \
327 328 fp_data.o \
328 329 func_decim.o \
329 330 gconvert.o \
330 331 hex_bin.o \
331 332 ieee_globals.o \
332 333 pack_float.o \
333 334 sigfpe.o \
334 335 string_decim.o
335 336
336 337 PORTGEN= \
337 338 _env_data.o \
338 339 _xftw.o \
339 340 a64l.o \
340 341 abort.o \
341 342 addsev.o \
342 343 ascii_strcasecmp.o \
343 344 ascii_strncasecmp.o \
344 345 assert.o \
345 346 atof.o \
346 347 atoi.o \
347 348 atol.o \
348 349 atoll.o \
349 350 attropen.o \
350 351 atexit.o \
351 352 atfork.o \
352 353 basename.o \
353 354 calloc.o \
354 355 catgets.o \
355 356 catopen.o \
356 357 cfgetispeed.o \
357 358 cfgetospeed.o \
358 359 cfree.o \
359 360 cfsetispeed.o \
360 361 cfsetospeed.o \
361 362 cftime.o \
362 363 clock.o \
363 364 closedir.o \
364 365 closefrom.o \
365 366 confstr.o \
366 367 crypt.o \
367 368 csetlen.o \
368 369 ctime.o \
369 370 ctime_r.o \
370 371 daemon.o \
371 372 deflt.o \
372 373 directio.o \
373 374 dirname.o \
374 375 div.o \
375 376 drand48.o \
376 377 dup.o \
377 378 env_data.o \
378 379 err.o \
379 380 errno.o \
380 381 euclen.o \
381 382 event_port.o \
382 383 execvp.o \
383 384 explicit_bzero.o \
384 385 fattach.o \
385 386 fdetach.o \
386 387 fdopendir.o \
387 388 ffs.o \
388 389 fls.o \
389 390 fmtmsg.o \
390 391 ftime.o \
391 392 ftok.o \
392 393 ftw.o \
393 394 gcvt.o \
394 395 getauxv.o \
395 396 getcwd.o \
396 397 getdate_err.o \
397 398 getdtblsize.o \
398 399 getentropy.o \
399 400 getenv.o \
400 401 getexecname.o \
401 402 getgrnam.o \
402 403 getgrnam_r.o \
403 404 gethostid.o \
404 405 gethostname.o \
405 406 gethz.o \
406 407 getisax.o \
407 408 getloadavg.o \
408 409 getlogin.o \
409 410 getmntent.o \
410 411 getnetgrent.o \
411 412 get_nprocs.o \
412 413 getopt.o \
413 414 getopt_long.o \
414 415 getpagesize.o \
415 416 getpw.o \
416 417 getpwnam.o \
417 418 getpwnam_r.o \
418 419 getrusage.o \
419 420 getspent.o \
420 421 getspent_r.o \
421 422 getsubopt.o \
422 423 gettxt.o \
423 424 getusershell.o \
424 425 getut.o \
425 426 getutx.o \
426 427 getvfsent.o \
427 428 getwd.o \
428 429 getwidth.o \
429 430 getxby_door.o \
430 431 gtxt.o \
431 432 hsearch.o \
432 433 iconv.o \
433 434 imaxabs.o \
434 435 imaxdiv.o \
435 436 index.o \
436 437 initgroups.o \
437 438 insque.o \
438 439 isaexec.o \
439 440 isastream.o \
440 441 isatty.o \
441 442 killpg.o \
442 443 klpdlib.o \
443 444 l64a.o \
444 445 lckpwdf.o \
445 446 lconstants.o \
446 447 lexp10.o \
447 448 lfind.o \
448 449 lfmt.o \
449 450 lfmt_log.o \
450 451 lldiv.o \
451 452 llog10.o \
452 453 lltostr.o \
453 454 lmath.o \
454 455 localtime.o \
455 456 lsearch.o \
456 457 madvise.o \
457 458 malloc.o \
458 459 memalign.o \
459 460 memmem.o \
460 461 mkdev.o \
461 462 mkdtemp.o \
462 463 mkfifo.o \
463 464 mkstemp.o \
464 465 mktemp.o \
465 466 mlock.o \
466 467 mlockall.o \
467 468 mon.o \
468 469 msync.o \
469 470 munlock.o \
470 471 munlockall.o \
471 472 ndbm.o \
472 473 nftw.o \
473 474 nlspath_checks.o \
474 475 nsparse.o \
475 476 nss_common.o \
476 477 nss_dbdefs.o \
477 478 nss_deffinder.o \
478 479 opendir.o \
479 480 opt_data.o \
480 481 perror.o \
481 482 pfmt.o \
482 483 pfmt_data.o \
483 484 pfmt_print.o \
↓ open down ↓ |
231 lines elided |
↑ open up ↑ |
484 485 pipe.o \
485 486 plock.o \
486 487 poll.o \
487 488 posix_fadvise.o \
488 489 posix_fallocate.o \
489 490 posix_madvise.o \
490 491 posix_memalign.o \
491 492 priocntl.o \
492 493 privlib.o \
493 494 priv_str_xlate.o \
495 + psecflags.o \
494 496 psiginfo.o \
495 497 psignal.o \
496 498 pt.o \
497 499 putpwent.o \
498 500 putspent.o \
499 501 raise.o \
500 502 rand.o \
501 503 random.o \
502 504 rctlops.o \
503 505 readdir.o \
504 506 readdir_r.o \
505 507 realpath.o \
506 508 reboot.o \
507 509 regexpr.o \
508 510 remove.o \
509 511 rewinddir.o \
510 512 rindex.o \
511 513 scandir.o \
512 514 seekdir.o \
513 515 select.o \
514 516 setlabel.o \
515 517 setpriority.o \
516 518 settimeofday.o \
517 519 sh_locks.o \
518 520 sigflag.o \
519 521 siglist.o \
520 522 sigsend.o \
521 523 sigsetops.o \
522 524 ssignal.o \
523 525 stack.o \
524 526 stpcpy.o \
525 527 stpncpy.o \
526 528 str2sig.o \
527 529 strcase_charmap.o \
528 530 strcat.o \
529 531 strchr.o \
530 532 strchrnul.o \
531 533 strcspn.o \
532 534 strdup.o \
533 535 strerror.o \
534 536 strlcat.o \
535 537 strlcpy.o \
536 538 strncat.o \
537 539 strndup.o \
538 540 strpbrk.o \
539 541 strrchr.o \
540 542 strsep.o \
541 543 strsignal.o \
542 544 strspn.o \
543 545 strstr.o \
544 546 strtod.o \
545 547 strtoimax.o \
546 548 strtok.o \
547 549 strtok_r.o \
548 550 strtoumax.o \
549 551 swab.o \
550 552 swapctl.o \
551 553 sysconf.o \
552 554 syslog.o \
553 555 tcdrain.o \
554 556 tcflow.o \
555 557 tcflush.o \
556 558 tcgetattr.o \
557 559 tcgetpgrp.o \
558 560 tcgetsid.o \
559 561 tcsendbreak.o \
560 562 tcsetattr.o \
561 563 tcsetpgrp.o \
562 564 tell.o \
563 565 telldir.o \
564 566 tfind.o \
565 567 time_data.o \
566 568 time_gdata.o \
567 569 tls_data.o \
568 570 truncate.o \
569 571 tsdalloc.o \
570 572 tsearch.o \
571 573 ttyname.o \
572 574 ttyslot.o \
573 575 ualarm.o \
574 576 ucred.o \
575 577 valloc.o \
576 578 vlfmt.o \
577 579 vpfmt.o \
578 580 waitpid.o \
579 581 walkstack.o \
580 582 wdata.o \
581 583 xgetwidth.o \
582 584 xpg4.o \
583 585 xpg6.o
584 586
585 587 PORTPRINT_W= \
586 588 doprnt_w.o
587 589
588 590 PORTPRINT= \
589 591 asprintf.o \
590 592 doprnt.o \
591 593 fprintf.o \
592 594 printf.o \
593 595 snprintf.o \
594 596 sprintf.o \
595 597 vfprintf.o \
596 598 vprintf.o \
597 599 vsnprintf.o \
598 600 vsprintf.o \
599 601 vwprintf.o \
600 602 wprintf.o
601 603
602 604 # Preserved solely to ease maintenance of 32-bit and 64-bit library builds
603 605 # This macro should ALWAYS be empty; native APIs are already 'large file'.
604 606 PORTSTDIO64=
605 607
606 608 PORTSTDIO_W= \
607 609 doscan_w.o
608 610
609 611 PORTSTDIO= \
610 612 __extensions.o \
611 613 _endopen.o \
612 614 _filbuf.o \
613 615 _findbuf.o \
614 616 _flsbuf.o \
615 617 _wrtchk.o \
616 618 clearerr.o \
617 619 ctermid.o \
618 620 ctermid_r.o \
619 621 cuserid.o \
620 622 data.o \
621 623 doscan.o \
622 624 fdopen.o \
623 625 feof.o \
624 626 ferror.o \
625 627 fgetc.o \
626 628 fgets.o \
627 629 fileno.o \
628 630 flockf.o \
629 631 flush.o \
630 632 fopen.o \
631 633 fpos.o \
632 634 fputc.o \
633 635 fputs.o \
634 636 fread.o \
635 637 fseek.o \
636 638 fseeko.o \
637 639 ftell.o \
638 640 ftello.o \
639 641 fwrite.o \
640 642 getc.o \
641 643 getchar.o \
642 644 getline.o \
643 645 getpass.o \
644 646 gets.o \
645 647 getw.o \
646 648 mse.o \
647 649 popen.o \
648 650 putc.o \
649 651 putchar.o \
650 652 puts.o \
651 653 putw.o \
652 654 rewind.o \
653 655 scanf.o \
654 656 setbuf.o \
655 657 setbuffer.o \
656 658 setvbuf.o \
657 659 system.o \
658 660 tempnam.o \
659 661 tmpfile.o \
660 662 tmpnam_r.o \
661 663 ungetc.o \
662 664 vscanf.o \
663 665 vwscanf.o \
664 666 wscanf.o
665 667
666 668 PORTI18N= \
667 669 getwchar.o \
668 670 putwchar.o \
669 671 putws.o \
670 672 strtows.o \
671 673 wcsnlen.o \
672 674 wcsstr.o \
673 675 wcstoimax.o \
674 676 wcstol.o \
675 677 wcstoul.o \
676 678 wcswcs.o \
677 679 wmemchr.o \
678 680 wmemcmp.o \
679 681 wmemcpy.o \
680 682 wmemmove.o \
681 683 wmemset.o \
682 684 wscat.o \
683 685 wschr.o \
684 686 wscmp.o \
685 687 wscpy.o \
686 688 wscspn.o \
687 689 wsdup.o \
688 690 wslen.o \
689 691 wsncat.o \
690 692 wsncmp.o \
691 693 wsncpy.o \
692 694 wspbrk.o \
693 695 wsprintf.o \
694 696 wsrchr.o \
695 697 wsscanf.o \
696 698 wsspn.o \
697 699 wstod.o \
698 700 wstok.o \
699 701 wstol.o \
700 702 wstoll.o \
701 703 wsxfrm.o \
702 704 gettext.o \
703 705 gettext_gnu.o \
704 706 gettext_real.o \
705 707 gettext_util.o \
706 708 plural_parser.o \
707 709 wdresolve.o \
708 710 _ctype.o \
709 711 isascii.o \
710 712 toascii.o
711 713
712 714 PORTI18N_COND= \
713 715 wcstol_longlong.o \
714 716 wcstoul_longlong.o
715 717
716 718 PORTLOCALE= \
717 719 big5.o \
718 720 btowc.o \
719 721 collate.o \
720 722 collcmp.o \
721 723 euc.o \
722 724 fnmatch.o \
723 725 fgetwc.o \
724 726 fgetws.o \
725 727 fix_grouping.o \
726 728 fputwc.o \
727 729 fputws.o \
728 730 fwide.o \
729 731 gb18030.o \
730 732 gb2312.o \
731 733 gbk.o \
732 734 getdate.o \
733 735 isdigit.o \
734 736 iswctype.o \
735 737 ldpart.o \
736 738 lmessages.o \
737 739 lnumeric.o \
738 740 lmonetary.o \
739 741 localeconv.o \
740 742 localeimpl.o \
741 743 mbftowc.o \
742 744 mblen.o \
743 745 mbrlen.o \
744 746 mbrtowc.o \
745 747 mbsinit.o \
746 748 mbsnrtowcs.o \
747 749 mbsrtowcs.o \
748 750 mbstowcs.o \
749 751 mbtowc.o \
750 752 mskanji.o \
751 753 nextwctype.o \
752 754 nl_langinfo.o \
753 755 none.o \
754 756 regcomp.o \
755 757 regfree.o \
756 758 regerror.o \
757 759 regexec.o \
758 760 rune.o \
759 761 runetype.o \
760 762 setlocale.o \
761 763 setrunelocale.o \
762 764 strcasecmp.o \
763 765 strcasestr.o \
764 766 strcoll.o \
765 767 strfmon.o \
766 768 strftime.o \
767 769 strncasecmp.o \
768 770 strptime.o \
769 771 strxfrm.o \
770 772 table.o \
771 773 timelocal.o \
772 774 tolower.o \
773 775 towlower.o \
774 776 ungetwc.o \
775 777 utf8.o \
776 778 wcrtomb.o \
777 779 wcscasecmp.o \
778 780 wcscoll.o \
779 781 wcsftime.o \
780 782 wcsnrtombs.o \
781 783 wcsrtombs.o \
782 784 wcswidth.o \
783 785 wcstombs.o \
784 786 wcsxfrm.o \
785 787 wctob.o \
786 788 wctomb.o \
787 789 wctrans.o \
788 790 wctype.o \
789 791 wcwidth.o \
790 792 wscol.o
791 793
792 794 AIOOBJS= \
793 795 aio.o \
794 796 aio_alloc.o \
795 797 posix_aio.o
796 798
797 799 RTOBJS= \
798 800 clock_timer.o \
799 801 mqueue.o \
800 802 pos4obj.o \
801 803 sched.o \
802 804 sem.o \
803 805 shm.o \
804 806 sigev_thread.o
805 807
806 808 TPOOLOBJS= \
807 809 thread_pool.o
808 810
809 811 THREADSOBJS= \
810 812 alloc.o \
811 813 assfail.o \
812 814 cancel.o \
813 815 door_calls.o \
814 816 tmem.o \
815 817 pthr_attr.o \
816 818 pthr_barrier.o \
817 819 pthr_cond.o \
818 820 pthr_mutex.o \
819 821 pthr_rwlock.o \
820 822 pthread.o \
821 823 rwlock.o \
822 824 scalls.o \
823 825 sema.o \
824 826 sigaction.o \
825 827 spawn.o \
826 828 synch.o \
827 829 tdb_agent.o \
828 830 thr.o \
829 831 thread_interface.o \
830 832 tls.o \
831 833 tsd.o
832 834
833 835 THREADSMACHOBJS= \
834 836 machdep.o
835 837
836 838 THREADSASMOBJS= \
837 839 asm_subr.o
838 840
839 841 UNICODEOBJS= \
840 842 u8_textprep.o \
841 843 uconv.o
842 844
843 845 UNWINDMACHOBJS= \
844 846 call_frame_inst.o \
845 847 eh_frame.o \
846 848 thrp_unwind.o \
847 849 unwind.o
848 850
849 851 pics/unwind.o:= COPTFLAG64 =
850 852
851 853 UNWINDASMOBJS= \
852 854 unwind_frame.o
853 855
854 856 # Preserved solely to ease maintenance of 32-bit and 64-bit library builds
855 857 # This macro should ALWAYS be empty; native APIs are already 'large file'.
856 858 PORTSYS64=
857 859
858 860 PORTSYS= \
859 861 _autofssys.o \
860 862 access.o \
861 863 acctctl.o \
862 864 bsd_signal.o \
863 865 chmod.o \
864 866 chown.o \
865 867 corectl.o \
866 868 exacctsys.o \
867 869 execl.o \
868 870 execle.o \
869 871 execv.o \
870 872 fcntl.o \
871 873 getpagesizes.o \
872 874 getpeerucred.o \
873 875 inst_sync.o \
874 876 issetugid.o \
875 877 label.o \
876 878 link.o \
877 879 lockf.o \
878 880 lwp.o \
879 881 lwp_cond.o \
880 882 lwp_rwlock.o \
881 883 lwp_sigmask.o \
882 884 meminfosys.o \
883 885 mkdir.o \
884 886 mknod.o \
885 887 msgsys.o \
886 888 nfssys.o \
887 889 open.o \
888 890 pgrpsys.o \
889 891 posix_sigwait.o \
890 892 ppriv.o \
891 893 psetsys.o \
892 894 rctlsys.o \
893 895 readlink.o \
894 896 rename.o \
895 897 sbrk.o \
896 898 semsys.o \
897 899 set_errno.o \
898 900 sharefs.o \
899 901 shmsys.o \
900 902 sidsys.o \
901 903 siginterrupt.o \
902 904 signal.o \
903 905 sigpending.o \
904 906 sigstack.o \
905 907 stat.o \
906 908 symlink.o \
907 909 tasksys.o \
908 910 time.o \
909 911 time_util.o \
910 912 ucontext.o \
911 913 unlink.o \
912 914 ustat.o \
913 915 utimesys.o \
914 916 zone.o
915 917
916 918 PORTREGEX= \
917 919 glob.o \
918 920 regcmp.o \
919 921 regex.o \
920 922 wordexp.o
921 923
922 924 VALUES= \
923 925 values-Xa.o
924 926
925 927 MOSTOBJS= \
926 928 $(STRETS) \
927 929 $(CRTOBJS) \
928 930 $(DYNOBJS) \
929 931 $(FPOBJS) \
930 932 $(I386FPOBJS) \
931 933 $(FPASMOBJS) \
932 934 $(ATOMICOBJS) \
933 935 $(CHACHAOBJS) \
934 936 $(XATTROBJS) \
935 937 $(COMOBJS) \
936 938 $(GENOBJS) \
937 939 $(PORTFP) \
938 940 $(PORTGEN) \
939 941 $(PORTGEN64) \
940 942 $(PORTI18N) \
941 943 $(PORTI18N_COND) \
942 944 $(PORTLOCALE) \
943 945 $(PORTPRINT) \
944 946 $(PORTPRINT_W) \
945 947 $(PORTREGEX) \
946 948 $(PORTSTDIO) \
947 949 $(PORTSTDIO64) \
948 950 $(PORTSTDIO_W) \
949 951 $(PORTSYS) \
950 952 $(PORTSYS64) \
951 953 $(AIOOBJS) \
952 954 $(RTOBJS) \
953 955 $(TPOOLOBJS) \
954 956 $(THREADSOBJS) \
955 957 $(THREADSMACHOBJS) \
956 958 $(THREADSASMOBJS) \
957 959 $(UNICODEOBJS) \
958 960 $(UNWINDMACHOBJS) \
959 961 $(UNWINDASMOBJS) \
960 962 $(COMSYSOBJS) \
961 963 $(SYSOBJS) \
962 964 $(COMSYSOBJS64) \
963 965 $(SYSOBJS64) \
964 966 $(VALUES)
965 967
966 968 TRACEOBJS= \
967 969 plockstat.o
968 970
969 971 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
970 972 # modules whose source is provided in the $(SRC)/lib/common directory.
971 973 # This must be done because otherwise the Sun C compiler would insert
972 974 # its own versions of these modules and those versions contain code
973 975 # to call out to C++ initialization functions. Such C++ initialization
974 976 # functions can call back into libc before thread initialization is
975 977 # complete and this leads to segmentation violations and other problems.
976 978 # Since libc contains no C++ code, linking with the minimal crti.o and
977 979 # crtn.o modules is safe and avoids the problems described above.
978 980 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
979 981 CRTSRCS= ../../common/amd64
980 982
981 983 # include common library definitions
982 984 include ../../Makefile.lib
983 985 include ../../Makefile.lib.64
984 986
985 987 CFLAGS64 += $(CTF_FLAGS)
986 988
987 989 # This is necessary to avoid problems with calling _ex_unwind().
988 990 # We probably don't want any inlining anyway.
989 991 CFLAGS64 += -xinline=
990 992
991 993 CERRWARN += -_gcc=-Wno-parentheses
992 994 CERRWARN += -_gcc=-Wno-switch
993 995 CERRWARN += -_gcc=-Wno-uninitialized
994 996 CERRWARN += -_gcc=-Wno-unused-value
995 997 CERRWARN += -_gcc=-Wno-unused-label
996 998 CERRWARN += -_gcc=-Wno-unused-variable
997 999 CERRWARN += -_gcc=-Wno-type-limits
998 1000 CERRWARN += -_gcc=-Wno-char-subscripts
999 1001 CERRWARN += -_gcc=-Wno-clobbered
1000 1002 CERRWARN += -_gcc=-Wno-unused-function
1001 1003 CERRWARN += -_gcc=-Wno-address
1002 1004
1003 1005 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
1004 1006 # enables ASSERT() checking in the threads portion of the library.
1005 1007 # This is automatically enabled for DEBUG builds, not for non-debug builds.
1006 1008 THREAD_DEBUG =
1007 1009 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG
1008 1010
1009 1011 # Make string literals read-only to save memory
1010 1012 CFLAGS64 += $(XSTRCONST)
1011 1013
1012 1014 ALTPICS= $(TRACEOBJS:%=pics/%)
1013 1015
1014 1016 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
1015 1017
1016 1018 MAPFILES = $(LIBCDIR)/port/mapfile-vers
1017 1019
1018 1020 CPPFLAGS= -D_REENTRANT -D$(MACH64) -D__$(MACH64) $(THREAD_DEBUG) \
1019 1021 -I. -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master)
1020 1022 ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) \
1021 1023 $(amd64_AS_XARCH)
1022 1024
1023 1025 # As a favor to the dtrace syscall provider, libc still calls the
1024 1026 # old syscall traps that have been obsoleted by the *at() interfaces.
1025 1027 # Delete this to compile libc using only the new *at() system call traps
1026 1028 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS
1027 1029
1028 1030 # proc64_id.o is built with defines in $(SRC)/uts/intel/sys/x86_archext.h
1029 1031 pics/proc64_id.o := CFLAGS64 += -I$(SRC)/uts/intel
1030 1032
1031 1033 # Inform the run-time linker about libc specialized initialization
1032 1034 RTLDINFO = -z rtldinfo=tls_rtldinfo
1033 1035 DYNFLAGS += $(RTLDINFO)
1034 1036
1035 1037 # Force libc's internal references to be resolved immediately upon loading
1036 1038 # in order to avoid critical region problems. Since almost all libc symbols
1037 1039 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20).
1038 1040 DYNFLAGS += -znow
1039 1041
1040 1042 BUILD.s= $(AS) $(ASFLAGS) $< -o $@
1041 1043
1042 1044 # Override this top level flag so the compiler builds in its native
1043 1045 # C99 mode. This has been enabled to support the complex arithmetic
1044 1046 # added to libc.
1045 1047 C99MODE= $(C99_ENABLE)
1046 1048
1047 1049 # libc method of building an archive
1048 1050 # The "$(GREP) -v ' L '" part is necessary only until
1049 1051 # lorder is fixed to ignore thread-local variables.
1050 1052 BUILD.AR= $(RM) $@ ; \
1051 1053 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)`
1052 1054
1053 1055 # extra files for the clean target
1054 1056 CLEANFILES= \
1055 1057 $(LIBCDIR)/port/gen/errlst.c \
1056 1058 $(LIBCDIR)/port/gen/new_list.c \
1057 1059 assym.h \
1058 1060 genassym \
1059 1061 crt/_rtld.s \
1060 1062 pics/crti.o \
1061 1063 pics/crtn.o \
1062 1064 $(ALTPICS)
1063 1065
1064 1066 CLOBBERFILES += $(LIB_PIC)
1065 1067
1066 1068 # list of C source for lint
1067 1069 SRCS= \
1068 1070 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \
1069 1071 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \
1070 1072 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \
1071 1073 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \
1072 1074 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \
1073 1075 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \
1074 1076 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \
1075 1077 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \
1076 1078 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \
1077 1079 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \
1078 1080 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \
1079 1081 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \
1080 1082 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \
1081 1083 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \
1082 1084 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \
1083 1085 $(THREADSMACHOBJS:%.o=threads/%.c) \
1084 1086 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \
1085 1087 $(UNWINDMACHOBJS:%.o=unwind/%.c) \
1086 1088 $(FPOBJS:%.o=fp/%.c) \
1087 1089 $(I386FPOBJS:%.o=$(LIBCDIR)/i386/fp/%.c) \
1088 1090 $(LIBCBASE)/gen/ecvt.c \
1089 1091 $(LIBCBASE)/gen/makectxt.c \
1090 1092 $(LIBCBASE)/gen/siginfolst.c \
1091 1093 $(LIBCBASE)/gen/siglongjmp.c \
1092 1094 $(LIBCBASE)/gen/sync_instruction_memory.c \
1093 1095 $(LIBCBASE)/sys/uadmin.c
1094 1096
1095 1097 # conditional assignments
1096 1098 # $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o
1097 1099 $(DYNLIB) := CRTI = crti.o
1098 1100 $(DYNLIB) := CRTN = crtn.o
1099 1101
1100 1102 # Files which need the threads .il inline template
1101 1103 TIL= \
1102 1104 aio.o \
1103 1105 alloc.o \
1104 1106 assfail.o \
1105 1107 atexit.o \
1106 1108 atfork.o \
1107 1109 cancel.o \
1108 1110 door_calls.o \
1109 1111 err.o \
1110 1112 errno.o \
1111 1113 lwp.o \
1112 1114 ma.o \
1113 1115 machdep.o \
1114 1116 posix_aio.o \
1115 1117 pthr_attr.o \
1116 1118 pthr_barrier.o \
1117 1119 pthr_cond.o \
1118 1120 pthr_mutex.o \
1119 1121 pthr_rwlock.o \
1120 1122 pthread.o \
1121 1123 rand.o \
1122 1124 rwlock.o \
1123 1125 scalls.o \
1124 1126 sched.o \
1125 1127 sema.o \
1126 1128 sigaction.o \
1127 1129 sigev_thread.o \
1128 1130 spawn.o \
1129 1131 stack.o \
1130 1132 synch.o \
1131 1133 tdb_agent.o \
1132 1134 thr.o \
1133 1135 thread_interface.o \
1134 1136 thread_pool.o \
1135 1137 thrp_unwind.o \
1136 1138 tls.o \
1137 1139 tmem.o \
1138 1140 tsd.o
1139 1141
1140 1142 $(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il
1141 1143
1142 1144 # pics/mul64.o := CFLAGS64 += crt/mul64.il
1143 1145
1144 1146 # large-file-aware components that should be built large
1145 1147
1146 1148 #$(COMSYSOBJS64:%=pics/%) := \
1147 1149 # CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1148 1150
1149 1151 #$(SYSOBJS64:%=pics/%) := \
1150 1152 # CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1151 1153
1152 1154 #$(PORTGEN64:%=pics/%) := \
1153 1155 # CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1154 1156
1155 1157 #$(PORTSTDIO64:%=pics/%) := \
1156 1158 # CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1157 1159
1158 1160 #$(PORTSYS64:%=pics/%) := \
1159 1161 # CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1160 1162
1161 1163 $(PORTSTDIO_W:%=pics/%) := \
1162 1164 CPPFLAGS += -D_WIDE
1163 1165
1164 1166 $(PORTPRINT_W:%=pics/%) := \
1165 1167 CPPFLAGS += -D_WIDE
1166 1168
1167 1169 $(PORTPRINT_C89:%=pics/%) := \
1168 1170 CPPFLAGS += -D_C89_INTMAX32
1169 1171
1170 1172 $(PORTSTDIO_C89:%=pics/%) := \
1171 1173 CPPFLAGS += -D_C89_INTMAX32
1172 1174
1173 1175 $(PORTI18N_COND:%=pics/%) := \
1174 1176 CPPFLAGS += -D_WCS_LONGLONG
1175 1177
1176 1178 pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha
1177 1179
1178 1180 .KEEP_STATE:
1179 1181
1180 1182 all: $(LIBS) $(LIB_PIC)
1181 1183
1182 1184 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp
1183 1185 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
1184 1186 lint := LINTFLAGS64 += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
1185 1187
1186 1188 lint:
1187 1189 @echo $(LINT.c) ... $(LDLIBS)
1188 1190 @$(LINT.c) $(SRCS) $(LDLIBS)
1189 1191
1190 1192 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc
1191 1193 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
1192 1194 $(LINTLIB):= LINTFLAGS64=-nvx -m64
1193 1195
1194 1196 # object files that depend on inline template
1195 1197 $(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il
1196 1198 # pics/mul64.o: crt/mul64.il
1197 1199
1198 1200 # include common libc targets
1199 1201 include ../Makefile.targ
1200 1202
1201 1203 # We need to strip out all CTF data from the static library
1202 1204 $(LIB_PIC) := DIR = pics
1203 1205 $(LIB_PIC): pics $$(PICS)
1204 1206 $(BUILD.AR)
1205 1207 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1
1206 1208 $(AR) -ts $@ > /dev/null
1207 1209 $(POST_PROCESS_A)
1208 1210
1209 1211 ASSYMDEP_OBJS= \
1210 1212 _lwp_mutex_unlock.o \
1211 1213 _stack_grow.o \
1212 1214 asm_subr.o \
1213 1215 getcontext.o \
1214 1216 setjmp.o \
1215 1217 tls_get_addr.o \
1216 1218 vforkx.o
1217 1219
1218 1220 $(ASSYMDEP_OBJS:%=pics/%): assym.h
1219 1221
1220 1222 # assym.h build rules
1221 1223
1222 1224 GENASSYM_C = genassym.c
1223 1225
1224 1226 genassym: $(GENASSYM_C)
1225 1227 $(NATIVECC) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \
1226 1228 -o $@ $(GENASSYM_C)
1227 1229
1228 1230 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
1229 1231
1230 1232 assym.h: $(OFFSETS) genassym
1231 1233 $(OFFSETS_CREATE) <$(OFFSETS) >$@
1232 1234 ./genassym >>$@
1233 1235
1234 1236 # derived C source and related explicit dependencies
1235 1237 $(LIBCDIR)/port/gen/errlst.c + \
1236 1238 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
1237 1239 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist
1238 1240
1239 1241 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c
1240 1242
1241 1243 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c
↓ open down ↓ |
738 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX