summaryrefslogtreecommitdiffstats
path: root/lib/csu
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-10-13 02:35:19 +0000
committersjg <sjg@FreeBSD.org>2013-10-13 02:35:19 +0000
commit7fcd33c1faf567506b5c0b4148c7a15a10788a5d (patch)
tree2c6f4d1ca5d1c643faea64e1f4c90105a1ab406a /lib/csu
parent2a59274eda20cc626e28052fff7aa8b7bf6a3683 (diff)
parent5cca672bb0892f1c5da630c34a1f98e2de4d7064 (diff)
downloadFreeBSD-src-7fcd33c1faf567506b5c0b4148c7a15a10788a5d.zip
FreeBSD-src-7fcd33c1faf567506b5c0b4148c7a15a10788a5d.tar.gz
Merge head@256284
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/arm/crt1.c14
-rw-r--r--lib/csu/common/notes.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/csu/arm/crt1.c b/lib/csu/arm/crt1.c
index e3529b8..d9f8a2d 100644
--- a/lib/csu/arm/crt1.c
+++ b/lib/csu/arm/crt1.c
@@ -115,6 +115,20 @@ __start(int argc, char **argv, char **env, struct ps_strings *ps_strings,
exit(main(argc, argv, env));
}
+static const struct {
+ int32_t namesz;
+ int32_t descsz;
+ int32_t type;
+ char name[sizeof(NOTE_FREEBSD_VENDOR)];
+ char desc[sizeof(MACHINE_ARCH)];
+} archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = {
+ .namesz = sizeof(NOTE_FREEBSD_VENDOR),
+ .descsz = sizeof(int32_t),
+ .type = ARCH_NOTETYPE,
+ .name = NOTE_FREEBSD_VENDOR,
+ .desc = MACHINE_ARCH
+};
+
#ifdef GCRT
__asm__(".text");
__asm__("eprol:");
diff --git a/lib/csu/common/notes.h b/lib/csu/common/notes.h
index fcc2b66..b2c53bf 100644
--- a/lib/csu/common/notes.h
+++ b/lib/csu/common/notes.h
@@ -34,5 +34,6 @@
#define ABI_NOTETYPE 1
#define CRT_NOINIT_NOTETYPE 2
+#define ARCH_NOTETYPE 3
#endif
OpenPOWER on IntegriCloud