[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Binutils 2.18 + GCC 4.2.3



Keith Scroggins wrote:
Here is the 'problem' in the output:

argv[129] = "viewport.o"
argv[130] = "B@//?"
argv[131] = "Nu//"
argv[132] = "widget.o"

I replaced g++ for this output.  I'll dig into the makefile more....

So either the arguments are not correctly encoded by the calling program, either they are not correctly decoded by the startup code in the called program !

I note the following :
argv[131] = "Nu//"

"Nu" is the ASCII equivalent for the "rts" assembler instruction.
So it seems there is a bad mix between code and data !
Maybe a buffer overflow ?

So, would this be make creating the issue or ?

Looking at the Makefile (just snippets)

SRCS += vehicle_gui.c
SRCS += viewport.c
SRCS += water_cmd.c
SRCS += waypoint.c
SRCS += widget.c
SRCS += window.c

Thats the list, from there is looks like 2 files are excluded (water_cmd.c and waypoint.c).

The object list is created with:

OBJS += $(filter %.o, $(SRCS:%.cpp=%.o) $(SRCS:%.m=%.o) $(SRCS:%.c=%.o) $(SRCS:%.rc=%.o))

Which appears fine to me.

Finally linking

$(Q)$(CXX_TARGET) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@

So, hide what we are doing, use g++, ldflags are set to -s (for stripping), TTDLDFLAGS are not set, OBJS are from above, libs are the libraries it depends on, which appear to be fine.

Hmmmm....  I'm going to look into make in a bit....

Keith