History log of /fuchsia/zircon/system/ulib/elfload/elf-load.c
Revision Date Author Comments
# 989ee4e8 13-Jun-2018 David Moore <davemoore@google.com>

[syscalls] Change vmar_... calls

- Create zx_vm_option_t type
- Change ZX_VM_FLAG_... to ZX_VM_... and make them new type.
- Change int32_t flags parameters to zx_vm_option_t options
- Make the options parameter be second.

- Modify vmar_..._old functions to keep other repos working.
Once they've all been updated these functions will go away.

ZX-2264
Test:CQ

Change-Id: I1faf4cc4e1e4dabf3d8ef680e398d83a545b0f09


# 9db0af33 20-Mar-2018 Shai Barack <shayba@google.com>

[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 4/n

This reverts commit d7c91f0a8a876bd4de8808595cafcd4f2c3fd7a1.

Change-Id: I5c61410f62850583a970d3ff2f44b6d58901509a


# d7c91f0a 19-Mar-2018 Benjamin Brittain <bwb@google.com>

[revert] Revert "[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 4/n"

This reverts commit 2d25909b7ab244d73172c9f5bc11d85b49ccefbb.

Change-Id: I09efe4e1d69d7aeadb051936d3ddc8237e7d39cf


# 2d25909b 14-Mar-2018 Shai Barack <shayba@google.com>

[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 4/n

Remove actual from zx_vmo_{read,write}
Mark zx_vmo_{read,write}_old as deprecated
Retarget most uses of zx_vmo_{read,write}_old to zx_vmo_{read,write}.

Still need to migrate a handful of uses of _old that had meaningful
usage of actual.
This is good enough to go ahead and migrate uses in Garnet and Topaz.

ZX-1802

Change-Id: If57329f9c5183a0dacd29083decbaf771925145f


# 939f4207 12-Mar-2018 Shai Barack <shayba@google.com>

[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 1/n

In preparation for changing the zx_vmo_read() and write() syscalls,
introduce aliases (zx_vmo_read_old() and write_old()) for the existing
behaviour, migrate zircon callers to the aliases, and mark the original
syscalls as deprecated.

Once the garnet and above layers have been migrated, the original
syscalls will be adjusted to remove the "actual" argument, and the
temporary _old() versions will be deprecated, and then removed.

ZX-1802

Change-Id: I2fab9a59caf4093fb585ada6015197017767aba2


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

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# d6396fa4 16-Jun-2017 George Kulakowski <kulakowski@google.com>

[ulib][status] Use the MX_OK and MX_ERR_* mx_status_t names

Change-Id: I3ba531de766b559b8922fb4910715c630efc9b82


# aac8231e 07-Jun-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Improve naming of data/bss VMOs

Use "bss:name" instead of just "bss" for the bss VMO.
Give the name "data:name" to the writable data VMO.

Change-Id: I62880b0a43f94baecac5e90a3f5fdd1ae4ca51b4


# ffc5132b 02-Jun-2017 Adam Barth <abarth@chromium.org>

[launchpad] Name bss VMO

Change-Id: I3f1cc2fd871d301e119f669865491e9aee275417


# 3516675c 09-May-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Remove unnecessary vmar_self parameter

This is no longer needed, so don't pass it down.

Change-Id: I28f995cb4a34a467b13074767a2b5b0006af086e


# 10aff72b 12-Apr-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Use mx_vmo_clone for writable segments

We now have copy-on-write support, so use it.

Change-Id: I66bef27521a139dd36a5a498a5cf09e905a1f590


# 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


# fd4333ef 07-Feb-2017 Roland McGrath <mcgrathr@google.com>

[processargs][userboot][launchpad] Plumb through MX_HND_TYPE_VMAR_LOADED

Add a processargs handle type for the VMAR used to load the initial
program image (usually the dynamic linker). This is passed down by
launchpad (and userboot), and received by the dynamic linker. It
enables the dynamic linker to apply RELRO page protections to its
own image after relocation.

Change-Id: Ib91933a41c52617207d33a631ff0436baf704ef1


# 44438704 13-Jan-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Fix up last change

The last change had a stray line that I'd removed in the version
I tested, but I'd failed to upload the tested version of the change.

Change-Id: I289c1cc5baf407ae09c883fb6325aaec4d28ede3


# 4b28494b 13-Jan-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Don't conflate mx_handle_t and mx_status_t values

Don't use mx_handle_t to contain status values, and don't assume
that handles are positive or that error codes are negative.

Change-Id: I535024f36f884bc9bc5515f82425452496c78bb3


# 0ebbbf55 12-Jan-2017 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Use a VMAR in the ELF loader

Make the ELF loader (used by both userboot and launchpad) allocate
a VMAR for the whole address region occupied by an ELF load image.

Change-Id: Id853d726a000fb7346c38a1bc844e72ced9570b4


# 6e63896d 22-Nov-2016 Todd Eisenberger <teisenbe@google.com>

[vmar][elf] Make the elf loader use VMARs

Change-Id: I1930a886b920f31de90d40d36b88840e1510f43b


# 7006ae17 07-Dec-2016 Roland McGrath <mcgrathr@google.com>

Remove mx_size_t and mx_ssize_t types

mx_ssize_t is no longer used. mx_size_t is superfluous and
can be replaced by the standard C type size_t.

Change-Id: I2137af6f166099d2e8aaca4fab63ff101f2a43ac


# cac54027 01-Nov-2016 Brian Swetland <swetland@google.com>

[syscalls] update vmo_{create,read,write}()

Change-Id: I6b46a48813de4e74767174c2786d04cf414b017a


# b847cabd 21-Oct-2016 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Refuse to load ET_EXEC files

We don't really support fixed-address ELF files (ET_EXEC).
So just reject them outright.

Change-Id: I86de4cdbc5fda203b41bd2139bf83a104c8efce2


# 488d4c76 01-Sep-2016 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Don't use process handle 0 hack

The COW-replacement code needs to map memory in the calling process,
so it needs its own process handle. Pass the handle in, rather than
using the old process handle 0 hack.

Change-Id: I7e0cc18c7218c248fae395ab13f38abd0bbb0791


# 0805d824 01-Sep-2016 Roland McGrath <mcgrathr@google.com>

[ulib][elfload] Fix VMO handle leak in mapping writable segments

The new structure of the code better represents how things will
look when there is a call to create a COW proxy object for a VMO.

Change-Id: I135dfdd85b1ca5d4afd7334a3fe2a0d739d7e65e


# dc1fd725 29-Aug-2016 Brian Swetland <swetland@google.com>

[magenta][syscalls] migrate all syscalls to the new names

If DEPCRECATE_COMPAT_SYSCALLS is defined, flag the compatibility
wrappers with the deprecated attribute.

Enable this in the Magenta build only for now.

Change-Id: I422b1294d9db2e56551eca65dede0e5d83f8b363


# c1a888ba 23-Aug-2016 Roland McGrath <mcgrathr@google.com>

[ulib][uapp] Replace internal elf-defines.h with standard <elf.h>

The C library provides a standard header for ELF structures and
constants. Get rid of the homegrown equivalent.

Change-Id: I54ab3faef434caf6b34fb0faef1a75daced5dae4


# 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


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

[ulib] [launchpad] Add launchpad_elf_load_extra function

This is a way to load an additional ELF file into the process
without it determining the entry point. Instead, the caller
(optionally) gets back the load address and entry point.

Change-Id: Ie74b0f4915a294663be3d7c8422f1126da8ab4e2


# cced204a 31-Jul-2016 Roland McGrath <mcgrathr@google.com>

[ulib] [launchpad] Factor core ELF loading code out into elfload library

The new library is simple, pure code that does no memory allocation.
It's still rolled directly into the launchpad library.
But it's also available to be rolled into other code.

Change-Id: Iec7f74285a1a3901d7cbfa08d5cf1ced9aeb3b27