History log of /fuchsia/zircon/system/utest/dlfcn/dlfcn.c
Revision Date Author Comments
# 4a19c750 13-Feb-2018 Adam Barth <abarth@chromium.org>

[loader-service] Remove simple loader service

The "simple" version was used only for tests. Now we test the real code.
Removing the simple loader lets us simplify the real loader a bit.

Change-Id: I760fd06f430d156614f66c880d865882e8f286c8


# 1b4508c6 12-Feb-2018 Adam Barth <abarth@chromium.org>

[loader-service] Separate loader-service from launchpad

There's no particular reason to link the code for implementing the
shared library service into the library for launching executables.

This CL also removes the unused local shared library loader codepath,
which would secretly spin up a thread in your process to export your
namespace to processes you created if your parent didn't provide you
with a functional shared library loader service.

Change-Id: I0f2a31197df49831a7630ff72cf8a6a561c3dbd0


# 6408b1ec 06-Feb-2018 Adam Barth <abarth@google.com>

[ldmsg] Convert the loader service to FIDL wire format

Previously, the loader service used a hand-rolled protocol. Now the
protocol is specified in //zircon/system/public/zircon/loader.fidl.

Because this protocol is used by such low-level components (e.g.,
userboot and libc), we do not use generated code to implement the
protocol. Instead, we use a stand-alone library, ldmsg, which manually
encodes and decodes messages according to the wire format specified in
loader.fidl.

This CL also moves fidl/types.h into zircon/fidl.h because these type
definitions are now fundamental to the operation of the system. Putting
their definition in this location makes them easier to reference from
userboot and libc.

Change-Id: I9a7619b09b0ff543b8883ac53852ade9d5c033b6


# 39e49ee3 07-Feb-2018 Adam Barth <abarth@google.com>

Revert "[ldmsg] Convert the loader service to FIDL wire format"

This reverts commit 3ff2a3f316904d6acf709169fb12ee059231d5d9.

Additional review comments need to be addressed.

Original change's description:
> [ldmsg] Convert the loader service to FIDL wire format
>
> Previously, the loader service used a hand-rolled protocol. Now the
> protocol is specified in //zircon/system/public/zircon/loader.fidl.
>
> Because this protocol is used by such low-level components (e.g.,
> userboot and libc), we do not use generated code to implement the
> protocol. Instead, we use a stand-alone library, ldmsg, which manually
> encodes and decodes messages according to the wire format specified in
> loader.fidl.
>
> This CL also moves fidl/types.h into zircon/fidl.h because these type
> definitions are now fundamental to the operation of the system. Putting
> their definition in this location makes them easier to reference from
> userboot and libc.
>
> Change-Id: I806455813d3a397a2eff41badadf61c28812e328

TBR=kulakowski@google.com,swetland@google.com,abarth@google.com

Change-Id: I7ac90b53cdc152dc8cd892eb394ec7f641161ee9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true


# 3ff2a3f3 06-Feb-2018 Adam Barth <abarth@google.com>

[ldmsg] Convert the loader service to FIDL wire format

Previously, the loader service used a hand-rolled protocol. Now the
protocol is specified in //zircon/system/public/zircon/loader.fidl.

Because this protocol is used by such low-level components (e.g.,
userboot and libc), we do not use generated code to implement the
protocol. Instead, we use a stand-alone library, ldmsg, which manually
encodes and decodes messages according to the wire format specified in
loader.fidl.

This CL also moves fidl/types.h into zircon/fidl.h because these type
definitions are now fundamental to the operation of the system. Putting
their definition in this location makes them easier to reference from
userboot and libc.

Change-Id: I806455813d3a397a2eff41badadf61c28812e328


# db964933 09-Jan-2018 Roland McGrath <mcgrathr@google.com>

[musl][ldso] Fix dladdr when the address matches an object but no symbol

According to the Linux man page, this case should return success but
zero the dli_sname and dli_saddr fields.

Change-Id: I5e9be8e7cd11f79cd3f122f7cbf4eb9c58ffdb02


# a65688a7 25-Sep-2017 Brian Swetland <swetland@google.com>

[devmgr][dmctl] no more system loader service via /dev/misc/dmctl

- now one can obtain a new connection to the loader service
being used by the current process with dl_clone_loader_service()
- remove the ioctl for getting the system loader service from dmctl
- remove tests for the same
- loader_service_get_default() now tries dl_clone_loader_service()
before falling back to creating a local fs-based loader

Change-Id: I2ebf9e0ddc0629da13e965b6bc7fc8e0464c8dcf


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 3e23b102 08-Sep-2017 Brian Swetland <swetland@google.com>

[mxio][launchpad] loader-service moves to launchpad

This is the logical place for it to live and paves the way to migrate
it away from the soon-to-be-no-more mxio dispatcher.

Tidied up the API, de-mxio'd it, put it behind a common loader_service_
prefix, and broke some swiss-army-knife interfaces into more standalone
pieces, hopefully easier to understand.

Change-Id: I91acd79a44c5dcc72412484bd6e151a54d52c8a1


# 4b913ba9 10-Aug-2017 Mark Seaborn <mseaborn@google.com>

[unittest] Use ASSERT_NE()/EXPECT_NE() instead of ASSERT_NEQ()/EXPECT_NEQ()

This is to make the interface more consistent with gtest, which uses
the _NE suffix rather than _NEQ for "not equal".

Change-Id: Ic03fda7322ab79cbd806c8f849b6956d201c6d45


# ef45edec 26-Jul-2017 Brian Swetland <swetland@google.com>

[utest][handles] don't treat handles as signed

So we will still compile when they become unsigned.

Change-Id: Ifc5d98aec0bbd26cb9fabcbdd6be00cd520e0343


# bfe31ac2 26-Jul-2017 Brian Swetland <swetland@google.com>

[utest][handles] don't treat handles as signed

Otherwise we can't build when they become unsigned.

Change-Id: I9af3e25c9716a41985320016c5559c09d6c8e520


# 1f1e992d 22-Jul-2017 Brian Swetland <swetland@google.com>

[mxio][loader-service][handles] stop mixing statuses and handles

Change-Id: Iadd5a4538a13e17332a65c5c4a5b98e0a063a741


# 6a1c7e5b 22-Jul-2017 Brian Swetland <swetland@google.com>

[mxio][loader-service][handles] stop mixing handles and statuses

Change-Id: If0506ed0d6785cd2be726c4b3463edbcd7006d2b


# 44868e28 21-Jul-2017 Brian Swetland <swetland@google.com>

[launchpad][handles] prepare for uint32 handles

Handle cannot be mingled with status return.

launchpad_vmo_from_...() now return their vmos via
out parameter.

Change-Id: Ibbffa40754c551a246b443fdbe98be053980867c


# 68b78541 24-Jul-2017 Roland McGrath <mcgrathr@google.com>

[utest] Fix library file locations embedded in tests for USE_ASAN=true case

Change-Id: I9814a80603a3cafd2877c4af6f9332c4fbdc13ac


# 29127ca3 24-Jul-2017 Brian Swetland <swetland@google.com>

Revert "[launchpad][handles] prepare for uint32 handles"

Turns out Dart is not tracked 1:1 by Fuchsia so we need
to revert and re-apply these changes later.

This reverts commit 7a39bd5529a3b33b776221979f7c889b2aa4f0e3.

Change-Id: Iadb6d55208653902cc5e0ba7f2dc1b3aebaf0e77


# d1f2743a 24-Jul-2017 Brian Swetland <swetland@google.com>

Revert "[mxio][loader-service][handles] stop mixing handles and statuses"

Turns out Dart is not tracked 1:1 by Fuchsia so we need
to revert and re-apply these changes later.

This reverts commit 96a1af6b80b2c2a160e3806aa7d2eb82b9d1644f.

Change-Id: I4e71d8aaa2a11a436b6e090b71016960f3690d2f


# becb0097 24-Jul-2017 Brian Swetland <swetland@google.com>

Revert "[mxio][loader-service][handles] stop mixing statuses and handles"

Turns out Dart is not tracked 1:1 by Fuchsia so we need
to revert and re-apply these changes later.

This reverts commit 3db3fe5525e1b1229e620e13d90e684ed226a1cd.

Change-Id: Id095ba7f46d091479e45e124675960883b13b9c6


# 3db3fe55 22-Jul-2017 Brian Swetland <swetland@google.com>

[mxio][loader-service][handles] stop mixing statuses and handles

Change-Id: Iba8029d815e82036fa861f0cd1ca283d647b11ba


# 96a1af6b 22-Jul-2017 Brian Swetland <swetland@google.com>

[mxio][loader-service][handles] stop mixing handles and statuses

Change-Id: Ia90a6f34f45d3979cdd66a47a31494e113ccb16e


# 7a39bd55 21-Jul-2017 Brian Swetland <swetland@google.com>

[launchpad][handles] prepare for uint32 handles

Handle cannot be mingled with status return.

launchpad_vmo_from_...() now return their vmos via
out parameter.

Change-Id: I4e4d33d05ce47f1b5b2bc5738b8df4d52dd0a13b


# 5163357d 26-Jun-2017 Roland McGrath <mcgrathr@google.com>

[ulib][musl][mxio] __sanitizer_publish_data via loader service

This adds a <magenta/sanitizer.h> interface for publishing a VMO
to a "data sink". This will be used for exporting binary blobs
such as coverage data. The libc implementation of this function
works by simply sending the VMO and data sink name in an RPC to
the loader service. Later this will be implemented on the server
side to do something with the data.

Change-Id: I21a25fe66445a0ef5e26bcd3da9e73d1a0ba448d


# 47096811 27-Feb-2017 Brian Swetland <swetland@google.com>

[devhost] don't link misc devices from /dev/class/misc/...

misc devices are singletons which should only appear under their
parent device in the hierarchy. "pure" misc devices (which are
part of the physical device topology) live under /dev/misc/...

Change-Id: I7bf848fe0085a310776519fdf31647ce01eee49c


# 07d84cdb 23-Feb-2017 Josh Conner <joshconner@google.com>

[launchpad] Add script execution.

Adds support in launchpad for loading an interpreted script file,
with a new API function "launchpad_file_load".

Change-Id: Iba091890c9975c6066c7f5a38ad577879cd599c8


# 8d52b2f0 23-Jan-2017 Dave Bort <dbort@google.com>

[utest/dlfcn] Fix a race, handle some errors

Non-atomics will mostly work on x86, but ARM makes no guarantees.

EXPECT doesn't alter the test flow, so my_loader_service_ok could
be set to true even if things went wrong.

Change-Id: Icb25ed1c3fbb86cb52be547a183bf529bc17dda7


# ac67e440 30-Jan-2017 Dave Bort <dbort@google.com>

[devmgr][mxio] Add a system-wide loader service

Add a dmctl ioctl to get a handle to a shared system loader service,
which translates paths like "libhid.so" into VMOs containing the named
object's data.

Launchpad and other users of mxio_loader_service() will automatically
prefer the system loader service if available.

Before this, loading was done by in-process threads, which meant that
those processes needed filesystem access. This is a step towards
supporting dynamic binaries with no filesystem rights.

For now, the system loader service uses the same code as the in-process
loader service, but this may change. It also needs to be smarter to
avoid starvation from bad processes (MG-491).

Moving the loader-related prototypes to a new header caused some ripple
effects for code that depended on transitive includes from mxio/util.h.

For MG-451: "loader service"

Change-Id: I8adb534b55f96334017e979da6af263e19095d84


# f0232842 20-Oct-2016 Roland McGrath <mcgrathr@google.com>

[utest] Don't use {ASSERT,EXPECT}_{EQ,NEQ} for pointers

Use *_NONNULL instead. The *_EQ/*_NEQ macros want to print the
values as integers, and casting pointers to integers is fraught
with peril.

Change-Id: Id93a296ea8ac151d735b0579944fc65e8944b00a


# 66a201f1 16-Aug-2016 Brian Swetland <swetland@frotz.net>

[system] align license and license banners with Fuchsia

This adjusts the Magenta userspace code to match the prevailing
license in Fuchsia (three-clause BSD), using the same banner
and license text.

Change-Id: I6b6d79435c5dbaa32027888874849e4f47aaa7be


# 9c3e0c48 05-Aug-2016 Roland McGrath <mcgrathr@google.com>

[ulib] [musl] [mxio] Add dl_set_loader_service, generalize mxio_loader_service

This adds a Magenta-specific -ldl interface to set the handle
to the loader service that the dynamic linker will use. As
part of implementing the test for this, the mxio_loader_service
function is generalized.

Change-Id: I4c07704d47839f79fafd0ddc497c9e771c02cb35


# f82bdf3a 05-Aug-2016 Roland McGrath <mcgrathr@google.com>

[ulib] [musl] Add dlopen_vmo function

This adds a Magenta-specific extension to -ldl, declared in the
new header file <magenta/dlfcn.h>. The new function behaves like
dlopen, but takes a VM object handle instead of a file name.

Change-Id: Ia0748cf7b3e4c40ae0bf563f6d9f3182da04547b