joerg
463db15fc5
Do not pass the main object handle from the assembler startup stub to
...
the common ___start routine. It's only used for a pointless magic
version check. Thanks to martin@ for testing various architectures.
2018-11-26 17:37:44 +00:00
uwe
2bd409d71f
___start is __dso_hidden, so use CALL_DATUM_LOCAL and drop the PIC
...
prologue from __start.
2016-08-29 21:27:03 +00:00
christos
a0c7fda095
fix pic code; otherwise we generate text relocations.
2016-08-28 13:50:25 +00:00
joerg
4d12bfcd15
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
...
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
uwe
310c8e11f2
Claim copyright (per Joerg's request).
2012-06-02 22:15:15 +00:00
uwe
4d9bf144be
Implement crtbegin* for sh3. Tested to work on landisk.
2012-01-31 20:30:15 +00:00
uwe
1415c6da05
New ___start() C function takes 3 arguments instead of 6 and fetches
...
argc, argv and environ from ps_strings instead. Adjust the trampoline
accordingly.
Fix brain fart in previous: direct jump is jmp @rN, not bsrf rN.
2012-01-31 20:17:57 +00:00
uwe
cd23fa6d26
Use unambiguous .p2align 2 since .align 4 copied from i386 is
...
incorrect, as .align is .p2align on sh3, not .balign
2012-01-31 20:12:47 +00:00
uwe
ffe3d8992e
Since it's in a separate file now, we cannot use direct branch to label.
2012-01-29 23:27:24 +00:00
uwe
2e92e8630a
Steal arch/i386/crtend.S
2012-01-28 15:08:47 +00:00
uwe
002cc93ef2
Add a comment that explains what this code does.
2012-01-28 12:44:19 +00:00
uwe
30250d8bed
Asm cosmetic. Add a comment that explains what this trampoline does.
2012-01-28 12:21:13 +00:00
joerg
01bc9d5012
Switch i386 and x86_64 to the new CRT layout. The crt0.c body is shared
...
between all platforms and a small assembler stub in crt0.S is used for
setting up the proper stack and whatever else MD needs.
Extract crti.S and crtn. from the old dot_init.h files. Prepare other
platforms that use the 6-argument form of __(_)start for this.
Rewrite the crtbegin and crtend modules in assembler to make them
compiler independent. Document the interface in README.
2010-08-07 18:01:32 +00:00