Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 708d3240a -> eeb4df4d5


baselibc; add _start(), _libc_init_array() stub.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/03b57339
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/03b57339
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/03b57339

Branch: refs/heads/develop
Commit: 03b57339ff46b978d123637c94528e2f4552b8f7
Parents: 708d324
Author: Marko Kiiskila <[email protected]>
Authored: Mon Jan 9 14:01:56 2017 -0800
Committer: Marko Kiiskila <[email protected]>
Committed: Mon Jan 9 14:01:56 2017 -0800

----------------------------------------------------------------------
 compiler/arm-none-eabi-m0/compiler.yml |  2 +-
 compiler/arm-none-eabi-m4/compiler.yml |  2 +-
 libc/baselibc/src/start.c              | 37 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/03b57339/compiler/arm-none-eabi-m0/compiler.yml
----------------------------------------------------------------------
diff --git a/compiler/arm-none-eabi-m0/compiler.yml 
b/compiler/arm-none-eabi-m0/compiler.yml
index 4c2369b..56f81ae 100644
--- a/compiler/arm-none-eabi-m0/compiler.yml
+++ b/compiler/arm-none-eabi-m0/compiler.yml
@@ -31,6 +31,6 @@ compiler.flags.debug: [compiler.flags.default, -O1 -ggdb]
 
 compiler.as.flags: [-x, assembler-with-cpp]
 
-compiler.ld.flags: -static -specs=nosys.specs -lgcc -Wl,--gc-sections
+compiler.ld.flags: -static -specs=nosys.specs -lgcc -Wl,--gc-sections 
-nostartfiles
 compiler.ld.resolve_circular_deps: true
 compiler.ld.mapfile: true

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/03b57339/compiler/arm-none-eabi-m4/compiler.yml
----------------------------------------------------------------------
diff --git a/compiler/arm-none-eabi-m4/compiler.yml 
b/compiler/arm-none-eabi-m4/compiler.yml
index eaf5eb9..0b102d6 100644
--- a/compiler/arm-none-eabi-m4/compiler.yml
+++ b/compiler/arm-none-eabi-m4/compiler.yml
@@ -32,6 +32,6 @@ compiler.flags.debug: [compiler.flags.base, -O1 -ggdb]
 
 compiler.as.flags: [-x, assembler-with-cpp]
 
-compiler.ld.flags: -static -specs=nosys.specs -lgcc -Wl,--gc-sections
+compiler.ld.flags: -static -specs=nosys.specs -lgcc -Wl,--gc-sections 
-nostartfiles
 compiler.ld.resolve_circular_deps: true
 compiler.ld.mapfile: true

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/03b57339/libc/baselibc/src/start.c
----------------------------------------------------------------------
diff --git a/libc/baselibc/src/start.c b/libc/baselibc/src/start.c
new file mode 100644
index 0000000..9848c76
--- /dev/null
+++ b/libc/baselibc/src/start.c
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#include <stdlib.h>
+
+extern int main(int argc, char **argv);
+
+/*
+ * Rudimentary startup function.
+ */
+void _start(void)
+{
+    int rc;
+
+    rc = main(0, NULL);
+    exit(rc);
+}
+
+void
+__libc_init_array(void)
+{
+}

Reply via email to