Changeset 15854f1 in buchla-68k


Ignore:
Timestamp:
08/06/2017 08:44:54 PM (2 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
84c0125
Parents:
cc2c9e0
Message:

Don't rewrite symbols.

Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rcc2c9e0 r15854f1  
    1414# hand-written assembly language code
    1515
    16 FLAGS_COM :=    $(FLAGS) -mshort -std=c99 -fleading-underscore -ffreestanding \
    17                                 -nostdinc -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \
     16FLAGS_COM :=    $(FLAGS) -mshort -std=c99 -ffreestanding -nostdinc \
     17                                -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \
    1818                                -Wpedantic -Wconversion -Wsign-conversion -Wshadow \
    1919                                -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls \
     
    4141build/%.o:              prolog/%.c $(HEADERS) | build
    4242                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    43                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    4443
    4544build/%.o:              prolog/%.s $(HEADERS) | build
     
    6564build/%.o:              libcio/%.c $(HEADERS) | build
    6665                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    67                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    6866
    6967build/%.o:              libcio/%.s $(HEADERS) | build
     
    8886build/%.o:              vlib/%.c $(HEADERS) | build
    8987                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    90                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    9188
    9289build/%.o:              vlib/%.s $(HEADERS) | build
     
    106103build/%.o:              iolib/%.c $(HEADERS) | build
    107104                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    108                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    109105
    110106build/%.o:              iolib/%.s $(HEADERS) | build
     
    126122build/%.o:              libsm/%.c $(HEADERS) | build
    127123                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    128                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    129124
    130125libsm.a:                $(LIBSM_OBJ)
     
    143138build/%.o:              lib700/%.c $(HEADERS) | build
    144139                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    145                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    146140
    147141build/%.o:              lib700/%.s $(HEADERS) | build
     
    167161build/%.o:              rom/%.c $(HEADERS) | build
    168162                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    169                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    170163
    171164build/%.o:              rom/%.s $(HEADERS) | build
     
    217210build/%.o:              ram/%.c $(HEADERS) | build
    218211                                $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $<
    219                                 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@
    220212
    221213build/%.o:              ram/%.s $(HEADERS) | build
  • readme.txt

    rcc2c9e0 r15854f1  
    232232    functions to preserve A2 and D2, so that GCC code generation can
    233233    use all registers.
    234 
    235   * The hand-written assembly language code expects C function names
    236     to be prefixed with an underscore. That's why we pass the
    237     -fleading-underscore option to GCC. However, this breaks linking
    238     with libgcc, which doesn't use leading underscores.
    239 
    240     Currently, we work around this issue by stripping the leading
    241     underscore from references to libgcc functions using objcopy. See
    242     misc/rewrite.txt for the function name mapping.
    243 
    244     Ultimately, we should fix any references to C functions in the
    245     hand-written assembly language code.
Note: See TracChangeset for help on using the changeset viewer.