lp:klibc

Created by Thorsten Glaser and last modified
Get this branch:
bzr branch lp:klibc

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Thorsten Glaser
Project:
klibc
Review team:
maximilian attems
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.kernel.org/pub/scm/libs/klibc/klibc.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-1e3bde-prod-lp-code-import-17 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-17 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-17 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-14 and finished taking 10 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 15 seconds — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 15 seconds — see the log

Recent revisions

2205. By Ben Hutchings

[klibc] Work around ELF loader bugs when executables have only BSS

Some of klibc's test programs have BSS but no static data when built
to use the shared library. This is apparently very unusual, and
existing ELF loaders don't always handle it correctly.

I previously found that QEMU's ELF loader rejected such executables,
though this was eventually fixed.

Now a change in binutils for arm64 has revealed a bug in the kernel
ELF loader, that's causing it to reject those same executables. While
this might get fixed in one way or another, I think it's a sign that
this case is just not tested and it would be best to avoid it.

Therefore:

- Rename interp.S to shared-stub.S
- Add a single byte of static data to it

Signed-off-by: Ben Hutchings <email address hidden>

2204. By Ben Hutchings

[klibc] fcntl: Fix build failure for some architectures with Linux 5.19

Starting from Linux 5.19, the kernel UAPI headers now only define
__ARCH_FLOCK64_PAD if the architecture actually needs padding in
struct flock64. Wrap its use with #ifdef,

Signed-off-by: Ben Hutchings <email address hidden>

2203. By Ben Hutchings

[klibc] README.klibc: Update note about building compat user-space

- The list of 64-bit architectures that can have a 32-bit user-space
  was outdated. ia64 hasn't supported compat mode since Linux 2.6.27,
  while arm64 does support it. Rather than trying to keep this list
  up-to-date, delete it.

- There hasn't been a linux/include/asm symlink since Linux 2.6.30,
  so delete the reference to that.

- The 64-bit ports of klibc are widely used. For example, Debian and
  its derivatives have always used native builds of klibc on amd64 and
  arm64. So delete the statement that compat user-space is likely
  better-tested.

Signed-off-by: Ben Hutchings <email address hidden>

2202. By Ben Hutchings

[klibc] README.klibc: Add note about headers_install in cross-build

When cross-compiling, it's critical to get the kernel UAPI headers for
the target architectures. Add a sentence about this to the "Cross-
compiling" section.

Signed-off-by: Ben Hutchings <email address hidden>

2201. By Ben Hutchings

[klibc] Kbuild: Properly disable executable stacks in static builds

I typo'd the variable name KLIBCSTACKFLAGS in the value of
KLIBCCFLAGS, leaving the stack executable in statically linked
executables. Fix that.

Executables using a shared library did not have this problem, unless
they included assembly language sources. C compilers generate the
no-executable-stack header by default, and the interpreter definition
that's statically linked into such executables was built with a
correctly spelt KLIBCSTACKFLAGS as an extra option.

Fixes: c562319cdba0 ("[klibc] Kbuild: Add a per-architecture option to ...")
Signed-off-by: Ben Hutchings <email address hidden>

2200. By Greg Thelen <email address hidden>

[klibc] Revert " remove local insmod.c copy"

This reverts commit fbf8aa559d25685eea12248c76bcc983c68306b2.

insmod is useful to load boot drivers prior to calling kinit.

Signed-off-by: Greg Thelen <email address hidden>
Signed-off-by: Ben Hutchings <email address hidden>

2199. By Ben Hutchings

[klibc] Fix header installation from out-of-tree build

In an out-of-tree build we currently only install the kernel UAPI
headers and the generated <klibc/havesyscall.h>. Add an extra
command to copy headers from the source tree in an out-of-tree
build.

References: https://bugs.debian.org/1004465
Reported-by: Thorsten Glaser <email address hidden>
Signed-off-by: Ben Hutchings <email address hidden>

2198. By Ben Hutchings

[klibc] ia64: Fix out-of-tree build

The linker script is currently not found in an out-of-tree build.
The filename needs to start with $(srctree) to make this work.

Signed-off-by: Ben Hutchings <email address hidden>

2197. By Ben Hutchings

[klibc] 2.0.10 released, next version is 2.0.11

2196. By Ben Hutchings

[klibc] arm64,x86_64: Fix address collision when using LLD

LLD 13 is using a default base address of 2 MB for executables on
these architectures, and since we set the base address of klibc.so to
2 MB they are now colliding with each other.

Explicitly set the base address to 4 MB, matching GNU ld's default.

Signed-off-by: Ben Hutchings <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers