Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/lib/libsa
On 4/3/06, Christos Zoulas <christos%astron.com@localhost> wrote:
> Why didn't you encapsulate the test for (phdr[i].p_type & PT_LOPROC)
> in MD_LOADSEG(phdr[i]) as I suggested? PT_LOPROC throup PT_HIPROC are
> reserved for processor-specific extensions. Thus another architecture
> might choose not to set PT_LOPROC, but set PT_LOPROC + 1 to indicate
> that it wants to load a segment. Clearly the test does not belong in
> MI code, since the test has processor-specific semantics.
>
> christos
>
>
Sorry about this. I didn't follow your comment properly. Is the
following ok to commit ? It works on ia64 with:
#define MD_LOADSEG(phdr) (phdr.p_type == PT_IA_64_UNWIND ?
ia64_unwindtab = phdr.p_vaddr, ia64_unwindtablen = phdr.p_filesz, 1 :
0)
------------------------------------------------------------------------
+#ifndef MD_LOADSEG /* Allow processor ABI specific segment loads */
+#define MD_LOADSEG(a) /*CONSTCOND*/0
+#endif
+ if (MD_LOADSEG(phdr[i]))
+ goto loadseg;
+
+
if (phdr[i].p_type != PT_LOAD ||
(phdr[i].p_flags & (PF_W|PF_X)) == 0)
continue;
@@ -309,6 +317,7 @@
if ((IS_TEXT(phdr[i]) && (flags & LOAD_TEXT)) ||
(IS_DATA(phdr[i]) && (flags & LOAD_DATA))) {
+ loadseg:
/* Read in segment. */
PROGRESS(("%s%lu", first ? "" : "+",
(u_long)phdr[i].p_filesz));
-----------------------------------------------------------------------
--
~Cherry
Home |
Main Index |
Thread Index |
Old Index