|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
|
Revision tags: release/13.2.0, release/12.4.0 |
|
| #
51015e6d |
| 30-Oct-2022 |
Konstantin Belousov <[email protected]> |
csu: move common code to libc
Why? Most trivial point, it shaves around 600 bytes from the dynamic binaries on amd64. Less trivial, the removed code is no longer part of the ABI, and we can ship upd
csu: move common code to libc
Why? Most trivial point, it shaves around 600 bytes from the dynamic binaries on amd64. Less trivial, the removed code is no longer part of the ABI, and we can ship updates to it with libc updates. Right now most of the csu is linked into the binaries and require us to do somewhat tricky ABI compat when it needs to change. For instance, the init_array change would be much simpler and does not require note tagging if we have init calling code in libc.
This could be improved more, by splitting dynamic and static initialization. For instance, &_DYNAMIC tests can be removed then. Such change, nonetheless, would require building libc three times. I left this for later, after this change stabilizes, if ever.
Reviewed by: markj Discussed with: jrtc27 (some objections, see the review), imp Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D37220
show more ...
|
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
| #
b0ee263d |
| 03-Jul-2020 |
John Baldwin <[email protected]> |
Consolidate duplicated logic in csu Makefiles to lib/csu/Makefile.inc.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25537
|
| #
99282790 |
| 15-Jun-2020 |
John Baldwin <[email protected]> |
Remove the sed hack for ABI tag notes.
The ELF notes compiled in C were placed in a section with the wrong type (SHT_PROGBITS instead of SHT_NOTE). Previously, sed was used on the generated assembl
Remove the sed hack for ABI tag notes.
The ELF notes compiled in C were placed in a section with the wrong type (SHT_PROGBITS instead of SHT_NOTE). Previously, sed was used on the generated assembly to rewrite the section type. Instead, write the notes in assembly which permits setting the correct section type directly.
While here, move inline assembly entry points out of C and into assembly for aarch64, arm, and riscv.
Reviewed by: kib Tested on: amd64 (cirrus-ci), riscv64 Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25211
show more ...
|
|
Revision tags: release/11.4.0 |
|
| #
4ff85ece |
| 29-Jan-2020 |
Justin Hibbits <[email protected]> |
powerpc64/csu: Rename dummy asm file to force use of 'cc'
Implicit make rules build .S asm files with the compiler, rather than the assembler. r356889 removed GNU as from the build for powerpc targ
powerpc64/csu: Rename dummy asm file to force use of 'cc'
Implicit make rules build .S asm files with the compiler, rather than the assembler. r356889 removed GNU as from the build for powerpc targets, causing '.s' asm files to fail to build, due to a missing 'as'. Rename the one dummy asm file we have to a '.S' to force the implicit rules to build with the compiler rather than the assembler.
Reported by: Francis Little
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
52b05d66 |
| 12-Sep-2019 |
Leandro Lupori <[email protected]> |
[PPC64] Add ifunc support in libcsu
When ifuncs are used in statically linked binaries, the C runtime must perform the needed dynamic relocations, to make calls to ifuncs work correctly.
Reviewed b
[PPC64] Add ifunc support in libcsu
When ifuncs are used in statically linked binaries, the C runtime must perform the needed dynamic relocations, to make calls to ifuncs work correctly.
Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21070
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
5d031e33 |
| 12-Jan-2019 |
Justin Hibbits <[email protected]> |
Create crtsavres.o for powerpc builds
Summary: GCC expects to link in a crtsavres.o on powerpc platforms. On powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain some sa
Create crtsavres.o for powerpc builds
Summary: GCC expects to link in a crtsavres.o on powerpc platforms. On powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain some save/restore functions, which may not actually be necessary for newer modern GCC and clang. This appeases the in-tree gcc, though, and is needed in order to switch to the BSD CRTRBEGIN.
PR: 233751 Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D18826
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
bdafb02f |
| 13-Oct-2018 |
Konstantin Belousov <[email protected]> |
Process irelocs for statically linked binaries from crt1 on x86.
This makes statically linked binaries with ifuncs operational.
Reported and tested by: mjg Reviewed by: emaste, markj Sponsored by:
Process irelocs for statically linked binaries from crt1 on x86.
This makes statically linked binaries with ifuncs operational.
Reported and tested by: mjg Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation Approved by: re (rgrimes) Differential revision: https://reviews.freebsd.org/D17363
show more ...
|
|
Revision tags: release/11.2.0, release/10.4.0, release/11.1.0 |
|
| #
5944f899 |
| 07-Apr-2017 |
John Baldwin <[email protected]> |
Rework r234502 to include a modified CFLAGS along with ACFLAGS.
On most architectures crt objects are compiled in a multiple-step process so that sed can be run on the generated assembly. As the fi
Rework r234502 to include a modified CFLAGS along with ACFLAGS.
On most architectures crt objects are compiled in a multiple-step process so that sed can be run on the generated assembly. As the final step, the C compiler generates an object file from the modified assembly output. Currently this last step uses $CC with only $ACFLAGS. However, for other uses in the tree, $ACFLAGS is meant to include assembly-specific compiler flags that are in addition to $CFLAGS (see default .S.o rules bsd.suffixes.mk). In particular, external toolchains may require additional flags to select a non-default target which will be present in CFLAGS but not ACFLAGS. To support this while still mitigating the issue with CFLAGS described in r234502, include a modified CFLAGS that excludes "-g" when assembling the modified assembly files.
Note that normally an assembler ($AS) is used to assemble .s flags to object files (see bsd.suffixes.mk). However, llvm-based toolchains do not currently have a stand-alone assembler.
Reviewed by: imp Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10085
show more ...
|
| #
90b44255 |
| 07-Mar-2017 |
Justin Hibbits <[email protected]> |
Clang in base now supports -mlongcall, so remove this hack
PR: 215947 MFC after: 2 weeks
|
| #
23f6875a |
| 20-Jan-2017 |
Enji Cooper <[email protected]> |
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
This implifies pathing in make/displayed output
MFC after: 3 weeks Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
de0fbc4d |
| 24-Mar-2016 |
Bryan Drewery <[email protected]> |
Don't reset CC away from full-pathed gcc.
This was breaking the build when using CROSS_TOOLCHAIN=powerpc64-gcc
Sponsored by: EMC / Isilon Storage Division
|
| #
7c6cc9de |
| 21-Sep-2015 |
Bryan Drewery <[email protected]> |
Fix installation of 32bit libraries after r288074.
FILES is not used when LIBRARIES_ONLY is set, which is used to build and install the lib32 sysroot. All of the csu files do quality as "libraries"
Fix installation of 32bit libraries after r288074.
FILES is not used when LIBRARIES_ONLY is set, which is used to build and install the lib32 sysroot. All of the csu files do quality as "libraries" for this case so just undefine LIBRARIES_ONLY.
This is still better than the previous realinstall handling as it does not hook into META_MODE properly.
Sponsored by: EMC / Isilon Storage Division
show more ...
|
| #
5ca34122 |
| 21-Sep-2015 |
Bryan Drewery <[email protected]> |
Replace realinstall: and META_MODE staging hacks with FILES mechanism.
This partially reverts r270170 for lib/csu/i386 while retaining the change for using bsd.lib.mk.
These FILES groups could go i
Replace realinstall: and META_MODE staging hacks with FILES mechanism.
This partially reverts r270170 for lib/csu/i386 while retaining the change for using bsd.lib.mk.
These FILES groups could go into lib/csu/Makefile.inc but I've kept them in the Makefiles for clarity.
Sponsored by: EMC / Isilon Storage Division
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
4656c46d |
| 06-Feb-2015 |
Justin Hibbits <[email protected]> |
Add a comment explaining why gcc is needed.
X-MFC-With: 278231 MFC after: 2 weeks
|
| #
35eeacca |
| 05-Feb-2015 |
Justin Hibbits <[email protected]> |
powerpc64 csu needs to be built by gcc, so enforce that.
With this change, world is one step closer to being clang-able.
MFC after: 2 weeks
|
|
Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0 |
|
| #
d2cc835c |
| 20-Apr-2012 |
Dimitry Andric <[email protected]> |
After r217375, some startup objects under lib/csu are built in a special way: first they are compiled to assembly, then some sed'ing is done on the assembly, and lastly the assembly is compiled to an
After r217375, some startup objects under lib/csu are built in a special way: first they are compiled to assembly, then some sed'ing is done on the assembly, and lastly the assembly is compiled to an object file.
This last step is done using ${CC}, and not ${AS}, because when the compiler is clang, it outputs directives that are too advanced for our old gas. So we use clang's integrated assembler instead. (When the compiler is gcc, it just calls gas, and nothing is different, except one extra fork.)
However, in the .s to .o rules in lib/csu/$ARCH/Makefile, I still passed CFLAGS to the compiler, instead of ACFLAGS, which are specifically for compiling .s files.
In case you are using '-g' for debug info anywhere in your CFLAGS, it causes the .s files to already contain debug information in the assembly itself. In the next step, the .s files are also compiled using '-g', and if the compiler is clang, it complains: "error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code".
Fix this by using ${ACFLAGS} for compiling the .s files instead.
Reported by: jasone MFC after: 1 week
show more ...
|
|
Revision tags: release/8.3.0_cvs, release/8.3.0 |
|
| #
cce345c2 |
| 13-Mar-2012 |
Nathan Whitehorn <[email protected]> |
Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Add
Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini().
Reviewed by: kib Pointy hat to: kib
show more ...
|
| #
a22748db |
| 11-Mar-2012 |
Konstantin Belousov <[email protected]> |
Stop calling _init/_fini methods from crt1 for dynamic binaries. Do call preinit, init and fini arrays methods from crt1 for static binaries.
Mark new crt1 with FreeBSD-specific ELF note.
Move som
Stop calling _init/_fini methods from crt1 for dynamic binaries. Do call preinit, init and fini arrays methods from crt1 for static binaries.
Mark new crt1 with FreeBSD-specific ELF note.
Move some common crt1 code into new MI file ignore_init.c, to reduce duplication. Also, conservatively adjust nearby sources for style.
Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks
show more ...
|
|
Revision tags: release/9.0.0 |
|
| #
68a108e6 |
| 27-Jun-2011 |
Nathan Whitehorn <[email protected]> |
Build Scrt.o on powerpc64. Its introduction on other platforms got lost during the period of time the powerpc64 port was on a project branch.
|
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
| #
9ef4e3af |
| 13-Jan-2011 |
Dimitry Andric <[email protected]> |
Apply a workaround for a binutils issue with the .note.ABI-tag section generated from lib/csu/common/crtbrand.c (which ultimately ends up in executables and shared libraries, via crt1.o, gcrt1.o or S
Apply a workaround for a binutils issue with the .note.ABI-tag section generated from lib/csu/common/crtbrand.c (which ultimately ends up in executables and shared libraries, via crt1.o, gcrt1.o or Scrt1.o).
For all arches except sparc, gcc emits the section directive for the abitag struct in crtbrand.c with a PROGBITS type. However, newer versions of binutils (after 2.16.90) require the section to be of NOTE type, to guarantee that the .note.ABI-tag section correctly ends up in the first page of the final executable.
Unfortunately, there is no clean way to tell gcc to use another section type, so crtbrand.c (or the C files that include it) must be compiled in multiple steps:
- Compile the .c file to a .s file. - Edit the .s file to change the 'progbits' type to 'note', for the section directive that defines the .note.ABI-tag section. - Compile the .s file to an object file.
These steps are done in the invididual Makefiles for each applicable arch.
Reviewed by: kib
show more ...
|
|
Revision tags: release/8.1.0_cvs, release/8.1.0 |
|
| #
282e3762 |
| 10-Jul-2010 |
Nathan Whitehorn <[email protected]> |
C startup support for 64-bit PowerPC.
Obtained from: projects/ppc64
|