Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1567471 in mainline


Ignore:
Timestamp:
2019-01-09T12:38:13Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
272a293, 2d156bb
Parents:
d3e938c
git-author:
Jiri Svoboda <jiri@…> (2018-01-08 19:37:57)
git-committer:
Jiri Svoboda <jiri@…> (2019-01-09 12:38:13)
Message:

Enable dynamic linking on amd64

Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rd3e938c r1567471  
    578578
    579579% Dynamic linking support
    580 ! [PLATFORM=ia32] CONFIG_RTLD (n/y)
    581 ! [PLATFORM=abs32le|PLATFORM=amd64|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_RTLD (n)
     580! [PLATFORM=amd64|PLATFORM=ia32] CONFIG_RTLD (y/n)
     581! [PLATFORM=abs32le|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_RTLD (n)
    582582
    583583% Build shared libraries
  • defaults/amd64/Makefile.config

    rd3e938c r1567471  
    6565CONFIG_BFB_BPP = 16
    6666
     67# Dynamic linking support
     68CONFIG_RTLD = y
     69
     70# Build shared libraries
     71CONFIG_BUILD_SHARED_LIBS = y
     72
     73# Link against shared libraries
     74CONFIG_USE_SHARED_LIBS = y
     75
    6776# Include development files (headers, libraries)
    6877CONFIG_DEVEL_FILES = y
  • uspace/Makefile.common

    rd3e938c r1567471  
    112112
    113113AFLAGS = --fatal-warnings
    114 LDFLAGS = -Wl,--fatal-warnings,--warn-common
     114LDFLAGS = -Wl,--fatal-warnings,--warn-common -Wl,-z,max-page-size=0x1000
    115115
    116116ifeq ($(STATIC_NEEDED),y)
  • uspace/lib/c/generic/elf/elf_mod.c

    rd3e938c r1567471  
    420420        seg_ptr = (void *) seg_addr;
    421421
    422         DPRINTF("Load segment at addr %p, size 0x%zx\n", (void *) seg_addr,
    423             entry->p_memsz);
     422        DPRINTF("Load segment at addr %p, size 0x%zx, flags %c%c%c\n", (void *) seg_addr,
     423            entry->p_memsz,
     424            (entry->p_flags & PF_R) ? 'r' : '-',
     425            (entry->p_flags & PF_W) ? 'w' : '-',
     426            (entry->p_flags & PF_X) ? 'x' : '-');
    424427
    425428        if (entry->p_align > 1) {
     
    484487                return EE_OK;
    485488
    486         rc = as_area_change_flags(seg_ptr, flags);
     489        DPRINTF("as_area_change_flags(%p, %x)\n",
     490            (uint8_t *) base + bias, flags);
     491        rc = as_area_change_flags((uint8_t *) base + bias, flags);
    487492        if (rc != EOK) {
    488493                DPRINTF("Failed to set memory area flags.\n");
  • uspace/lib/c/generic/rtld/module.c

    rd3e938c r1567471  
    5050#include <rtld/rtld_arch.h>
    5151#include <rtld/module.h>
     52#include <libarch/rtld/module.h>
    5253
    5354#include "../private/libc.h"
     
    206207        DPRINTF("filename:'%s'\n", name_buf);
    207208
    208         rc = elf_load_file_name(name_buf, ELDF_RW, &info);
     209        rc = elf_load_file_name(name_buf, RTLD_MODULE_LDF, &info);
    209210        if (rc != EE_OK) {
    210211                printf("Failed to load '%s'\n", name_buf);
Note: See TracChangeset for help on using the changeset viewer.