| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25537
Notes:
svn path=/head/; revision=362902
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This was added in r293648 to pass -mlong-calls for crt1.o and gcrt1.o.
The use of -mlong-calls was removed in r358851 for LLVM 10.0, leaving
STATIC_CFLAGS empty.
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25305
Notes:
svn path=/head/; revision=362785
|
| |
|
|
|
|
|
|
|
|
| |
Reported by: np, peterj
Reviewed by: kib, emaste
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25469
Notes:
svn path=/head/; revision=362660
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25374
Notes:
svn path=/head/; revision=362589
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=362203
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Clang from 9.0.0 onwards already has the necessary relocation range
extenders, so this workaround is no longer needed (it produces longer
and slower code). Tested on real hardware, and in cross-compile
environment.
Submitted by: mmel
Notes:
svn path=/projects/clang1000-import/; revision=358831
|
| |
|
|
|
|
|
|
|
|
|
| |
The tests haven't been run them, but this is enough to build them so I can
get feedback on if the various crt.h headers are correct.
MFC with: r339738
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=339916
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=339351
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to grep the source tree for these notes, and
ensures that they will remain in sync.
Reviewed by: kib
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17408
Notes:
svn path=/head/; revision=339181
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326219
|
| |
|
|
|
|
|
|
| |
- Primarily http -> https
- Primarily FreeBSD project URLs
Notes:
svn path=/head/; revision=325096
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=316620
|
| |
|
|
|
|
|
|
|
|
| |
This implifies pathing in make/displayed output
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=312455
|
| |
|
|
|
|
|
|
|
|
|
| |
generate code to branch based on an address in a register. This allows us
to have binaries larger than the 32MiB limit of a branch instruction.
The main use of this is with clang. Clang 3.8.0 has been shown to be larger
than the above limit.
Notes:
svn path=/head/; revision=293648
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in csu.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=292000
|
| |
|
|
|
|
|
|
|
|
| |
the non-executable stack.
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=288373
|
| |
|
|
|
|
|
|
|
| |
This has not been needed since r246865 in projects/bmake.
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=288228
|
| |
|
|
|
|
|
|
|
| |
This has not been needed since r284171 in projects/bmake.
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=288226
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=288076
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=288074
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
Notes:
svn path=/head/; revision=284345
|
| | |\
| |/
|/|
| | |
Notes:
svn path=/projects/bmake/; revision=265006
|
| | |\
| | |
| | |
| | | |
Notes:
svn path=/projects/bmake/; revision=256424
|
| | |\ \
| | | |
| | | |
| | | | |
Notes:
svn path=/projects/bmake/; revision=246555
|
| | | | |
| | | |
| | | |
| | | | |
Notes:
svn path=/projects/bmake/; revision=242545
|
| | |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
happen sizeof(MACHINE_ARCH) is more than 4 bytes, and bad things would
happen. This should make the ctors being called again on armeb.
Notes:
svn path=/head/; revision=257233
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
for. This is useful for software needing to know which architecture a
binary is built for as arm and armv6 have slight differences meaning only
some binaries build for one will work as expected on the other. It is
expected pkgng will be able to make use of this to simplify the logic to
determine which package ABI to use.
Approved by: re (kib)
Notes:
svn path=/head/; revision=255874
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preloaded library could have changed the environment, and
unconditional assingment to the environ undoes the customization.
The binaries needs to be recompiled to get the fix.
Move the common code to set up environ and __progname into the helper.
Note that ia64 possibly not fixed, due to it still using old csu.
Reported and tested by: John Hein <jhein@symmetricom.com>
Reviewed by: kan, scf
Approved by: secteam (simon)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=245133
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=234502
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=232832
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=217375
|
| |
|
|
|
|
|
|
| |
macro for identification, instead of several different hand-rolled
variants (plain .ident, .ascii, etc).
Notes:
svn path=/head/; revision=216338
|
| |
|
|
|
|
|
|
|
| |
PR: bin/140089
Reviewed by: jmallett
Approved by: ed (co-mentor)
Notes:
svn path=/head/; revision=204757
|
| |
|
|
|
|
|
|
|
|
|
| |
Also move the declarations after __progname consistently to
make the distinction clearer.
Reviewed by: jmallett
Approved by: ed (co-mentor)
Notes:
svn path=/head/; revision=204756
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
Notes:
svn path=/head/; revision=201381
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scrt1.o instead of crt1.o, since the later is built as non-PIC.
Separate i386-elf crt1.c into the pure assembler part and C code,
supplying all data extracted by assembler stub as explicit parameters [1].
Hide and localize _start1 symbol used as an interface between asm and
C code.
In collaboration with: kan
Inspired by: PR i386/127387 [1]
Prodded and tested by: rdivacky [1]
MFC after: 3 weeks
Notes:
svn path=/head/; revision=200038
|
| |
|
|
| |
Notes:
svn path=/head/; revision=135679
|
| |
|
|
| |
Notes:
svn path=/head/; revision=133754
|
|
|
Notes:
svn path=/head/; revision=129205
|