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

Changeset afdcc60e in mainline


Ignore:
Timestamp:
2011-04-29T16:15:13Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
30c4005, 3f461ecf, bae7bdc
Parents:
933cadf
Message:

Link with -n (nmagic) instead of -N (omagic). omagic makes text sections
writable, which is wrong and breaks dynamic linking of variables
(since it makes the link editor put relocations in the text section
instead of the GOT).

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.build

    r933cadf rafdcc60e  
    111111
    112112$(RAW): $(OBJECTS) $(COMPONENT_OBJECTS) $(LINK)
    113         $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)
     113        $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(COMPONENT_OBJECTS) $(OBJECTS)
    114114
    115115$(LINK): $(LINK).comp $(DEPEND)
  • kernel/Makefile

    r933cadf rafdcc60e  
    134134#
    135135AFLAGS =
    136 LFLAGS = -N -T $(LINK) -M
     136LFLAGS = -n -T $(LINK) -M
    137137
    138138#
  • uspace/Makefile.common

    r933cadf rafdcc60e  
    185185
    186186$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    187         $(LD) -N $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
     187        $(LD) -n $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    188188ifeq ($(CONFIG_STRIP_BINARIES),y)
    189189        $(STRIP) $(BINARY)
Note: See TracChangeset for help on using the changeset viewer.