Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108610046
D30455.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D30455.diff
View Options
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1434,12 +1434,6 @@
Elf_Off offset; /* Offset of segment in core file */
};
-/* Closure for cb_size_segment(). */
-struct sseg_closure {
- int count; /* Count of writable segments. */
- size_t size; /* Total size of all writable segments. */
-};
-
typedef void (*outfunc_t)(void *, struct sbuf *, size_t *);
struct note_info {
@@ -1463,7 +1457,6 @@
struct note_info_list *, size_t, int);
static void __elfN(prepare_notes)(struct thread *, struct note_info_list *,
size_t *);
-static void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int);
static void __elfN(putnote)(struct note_info *, struct sbuf *);
static size_t register_note(struct note_info_list *, int, outfunc_t, void *);
@@ -1508,9 +1501,7 @@
TAILQ_INIT(¬elst);
/* Size the program segments. */
- seginfo.count = 0;
- seginfo.size = 0;
- each_dumpable_segment(td, cb_size_segment, &seginfo, flags);
+ __elfN(size_segments)(td, &seginfo, flags);
/*
* Collect info about the core file header area.
@@ -1645,6 +1636,16 @@
ssc->size += entry->end - entry->start;
}
+void
+__elfN(size_segments)(struct thread *td, struct sseg_closure *seginfo,
+ int flags)
+{
+ seginfo->count = 0;
+ seginfo->size = 0;
+
+ each_dumpable_segment(td, cb_size_segment, seginfo, flags);
+}
+
/*
* For each writable segment in the process's memory map, call the given
* function with a pointer to the map entry and some arbitrary
@@ -1803,7 +1804,7 @@
*sizep = size;
}
-static void
+void
__elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs,
size_t notesz, int flags)
{
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -100,6 +100,12 @@
#define MAX_BRANDS 8
+/* Closure for __elfN(size_segments)(). */
+struct sseg_closure {
+ int count; /* Count of writable segments. */
+ size_t size; /* Total size of all writable segments. */
+};
+
int __elfN(brand_inuse)(Elf_Brandinfo *entry);
int __elfN(insert_brand_entry)(Elf_Brandinfo *entry);
int __elfN(remove_brand_entry)(Elf_Brandinfo *entry);
@@ -108,6 +114,8 @@
size_t __elfN(populate_note)(int, void *, void *, size_t, void **);
void __elfN(stackgap)(struct image_params *, uintptr_t *);
int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t);
+void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int);
+void __elfN(size_segments)(struct thread *, struct sseg_closure *, int);
/* Machine specific function to dump per-thread information. */
void __elfN(dump_thread)(struct thread *, void *, size_t *);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 8:56 PM (7 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16212499
Default Alt Text
D30455.diff (2 KB)
Attached To
Mode
D30455: Unstaticize parts of coredumping code
Attached
Detach File
Event Timeline
Log In to Comment