Displaying 8 results from an estimated 8 matches for "_binary_init_start".
2016 Jan 12
2
Re: Note regarding bin2s.pl
...- it allows us to get rid of
>> that conditional code for HP-UX in bin2s.pl.
>>
>> However looking at the patch, I don't like the casts in:
>>
>> - size_t n = (size_t) &_binary_init_size;
>> + size_t n = ((size_t) &_binary_init_end) - ((size_t) &_binary_init_start);
>>
>> Since those are pointers, it seems better to simply subtract them.
>> (Though it would be better if we'd declared the type of
>> _binary_init_start/_end as uint8_t instead of char.)
>>
>> If we must cast them then the correct integer to use is 'in...
2016 Jan 12
2
Re: Note regarding bin2s.pl
...ug=809185]
I see it as a reasonable simplification - it allows us to get rid of
that conditional code for HP-UX in bin2s.pl.
However looking at the patch, I don't like the casts in:
- size_t n = (size_t) &_binary_init_size;
+ size_t n = ((size_t) &_binary_init_end) - ((size_t) &_binary_init_start);
Since those are pointers, it seems better to simply subtract them.
(Though it would be better if we'd declared the type of
_binary_init_start/_end as uint8_t instead of char.)
If we must cast them then the correct integer to use is 'intptr_t', an
int type that's guaranteed by C9...
2016 Jan 12
0
Re: Note regarding bin2s.pl
...gt; >> that conditional code for HP-UX in bin2s.pl.
> >>
> >> However looking at the patch, I don't like the casts in:
> >>
> >> - size_t n = (size_t) &_binary_init_size;
> >> + size_t n = ((size_t) &_binary_init_end) - ((size_t) &_binary_init_start);
> >>
> >> Since those are pointers, it seems better to simply subtract them.
> >> (Though it would be better if we'd declared the type of
> >> _binary_init_start/_end as uint8_t instead of char.)
> >>
> >> If we must cast them then the cor...
2017 Aug 23
0
[PATCH v2 supermin 1/1] Switch binary embedding to a C source
...git a/src/format-ext2-init-c.c b/src/format-ext2-init-c.c
index 66ad254..33147aa 100644
--- a/src/format-ext2-init-c.c
+++ b/src/format-ext2-init-c.c
@@ -27,19 +27,18 @@
#include <caml/memory.h>
/* The init binary.
- * See: bin2s.pl, init.c.
+ * See: bin2c.pl, init.c.
*/
-extern uint8_t _binary_init_start, _binary_init_end;
+#include <format-ext2-init-bin.h>
value
supermin_binary_init (value unitv)
{
CAMLparam1 (unitv);
CAMLlocal1 (sv);
- size_t n = &_binary_init_end - &_binary_init_start;
- sv = caml_alloc_string (n);
- memcpy (String_val (sv), &_binary_init_start,...
2017 Aug 23
2
[PATCH v2 supermin 0/1] Fix embedding of init
Hi,
this patch replaces the first simpler version:
https://www.redhat.com/archives/libguestfs/2017-August/msg00117.html
The approach now is to use a C snippet, which should pose way less
compatibility issues.
Thanks,
Pino Toscano (1):
Switch binary embedding to a C source
.gitignore | 2 +-
src/Makefile.am | 18 +++++++++---------
src/{bin2s.pl => bin2c.pl} |
2016 Jan 12
0
Re: Note regarding bin2s.pl
...onable simplification - it allows us to get rid of
> that conditional code for HP-UX in bin2s.pl.
>
> However looking at the patch, I don't like the casts in:
>
> - size_t n = (size_t) &_binary_init_size;
> + size_t n = ((size_t) &_binary_init_end) - ((size_t) &_binary_init_start);
>
> Since those are pointers, it seems better to simply subtract them.
> (Though it would be better if we'd declared the type of
> _binary_init_start/_end as uint8_t instead of char.)
>
> If we must cast them then the correct integer to use is 'intptr_t', an
> i...
2011 Jun 04
3
[PATCH 1/3] febootstrap/helper/init: make sure /proc is mounted into chroot.
---
helper/init.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/helper/init.c b/helper/init.c
index 0ca3135..2b5dacf 100644
--- a/helper/init.c
+++ b/helper/init.c
@@ -163,8 +163,10 @@ main ()
chdir ("/");
- /* Run /init from ext2 filesystem. */
+ mount_proc ();
print_uptime ();
+
+ /* Run /init from ext2 filesystem. */
execl
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...(void);
-static void add_module_dep (const char *name, const char *dep);
-static struct module * add_module (const char *name);
-static struct module * find_module (const char *name);
-static void print_module_load_order (FILE *f, FILE *pp, struct module *m);
-
-/* The init binary. */
-extern char _binary_init_start, _binary_init_end, _binary_init_size;
-
-/* The list of modules (wildcards) we consider for inclusion in the
- * mini initrd. Only what is needed in order to find a device with an
- * ext2 filesystem on it.
- */
-static const char *kmods[] = {
- "ext2.ko*",
- "ext4.ko*", /* C...