jeffpc / illumos-gate Goto Github PK
View Code? Open in Web Editor NEWThis project forked from illumos/illumos-gate
Community developed and maintained version of the OS/Net consolidation
Home Page: http://www.illumos.org/projects/illumos-gate
This project forked from illumos/illumos-gate
Community developed and maintained version of the OS/Net consolidation
Home Page: http://www.illumos.org/projects/illumos-gate
It always succeeds.
_NGREG, gregset32_t, mcontext32_t, ucontext32_t are just copies of whatever I could find (32-bit ARM, 64-bit x86) to make the compiler happy.
The function got copied from the 32-bit ARM code which checks against R_ARM_TLS_DTPOFF32. Is there a similar relocation on aarch64?
This should probably be hidden behind macros. I don't know what the proper check here would be, so I just took it out altogether.
$ dis debug64/xdr.o
disassembly for debug64/xdr.o
dis: fatal: debug64/xdr.o: unsupported ELF machine 0xb7
The kernel and loader should share.
This is a hack to avoid gcc complaining about not knowing what cmn_err-like format strings look like.
Many of the TLS relocations are missing. This is ok for now because we're very far away from dealing with TLS.
Instead of printing movw and movt, dis(1) prints mrs:
main()
main: 04 b0 2d e5 str r11, [sp, #-4]!
main+0x4: 00 b0 8d e2 add r11, sp, #0, 0 ; 0x00000000
main+0x8: 0c d0 4d e2 sub sp, sp, #12, 0 ; 0x0000000c
main+0xc: 08 00 0b e5 str r0, [r11, #-8]
main+0x10: 0c 10 0b e5 str r1, [r11, #-12]
main+0x14: 00 30 00 e3 mrs r3, cpsr
main+0x18: 01 30 40 e3 mrs r3, spsr
main+0x1c: 00 30 93 e5 ldr r3, [r3, #0]
main+0x20: 01 20 83 e2 add r2, r3, #1, 0 ; 0x00000001
main+0x24: 00 30 00 e3 mrs r3, cpsr
main+0x28: 01 30 40 e3 mrs r3, spsr
main+0x2c: 00 20 83 e5 str r2, [r3, #0]
main+0x30: f7 ff ff ea b -36 <main+0x14>
For comparison, this is the output from objdump -d foo
:
00008074 <main>:
8074: e52db004 push {fp} ; (str fp, [sp, #-4]!)
8078: e28db000 add fp, sp, #0
807c: e24dd00c sub sp, sp, #12
8080: e50b0008 str r0, [fp, #-8]
8084: e50b100c str r1, [fp, #-12]
8088: e3003000 movw r3, #0
808c: e3403001 movt r3, #1
8090: e5933000 ldr r3, [r3]
8094: e2832001 add r2, r3, #1
8098: e3003000 movw r3, #0
809c: e3403001 movt r3, #1
80a0: e5832000 str r2, [r3]
80a4: eafffff7 b 8088 <main+0x14>
Handle the following instruction used by various parts of the kernel:
fe800010: f102001b cps #27
fe807844: e6ef2072 uxtb r2, r2
fe8494e0: f57ff04f dsb sy
fe8002ec: f57ff05f dmb sy
fe849440: f57ff06f isb sy
It currently always returns NULL. Using #warning or #error isn't really what we want because that terminates the compilation.
/opt/arm64tc/usr/bin/ld -r -o debug64/genunix debug64/fake_stubs.o debug64/fake_data.o debug64/prom_env.o debug64/prom_emul.o debug64/prom_getchar.o debug64/prom_init.o debug64/prom_node.o debug64/prom_printf.o debug64/prom_prop.o debug64/prom_putchar.o debug64/prom_reboot.o debug64/prom_version.o debug64/access.o debug64/acl.o debug64/acl_common.o debug64/adjtime.o debug64/alarm.o debug64/aio_subr.o debug64/auditsys.o debug64/audit_core.o debug64/audit_zone.o debug64/audit_memory.o debug64/autoconf.o debug64/avl.o debug64/bdev_dsort.o debug64/bio.o debug64/bitmap.o debug64/blabel.o debug64/brandsys.o debug64/bz2blocksort.o debug64/bz2compress.o debug64/bz2decompress.o debug64/bz2randtable.o debug64/bz2bzlib.o debug64/bz2crctable.o debug64/bz2huffman.o debug64/callb.o debug64/callout.o debug64/chdir.o debug64/chmod.o debug64/chown.o debug64/cladm.o debug64/class.o debug64/clock.o debug64/clock_highres.o debug64/clock_realtime.o debug64/close.o debug64/compress.o debug64/condvar.o debug64/conf.o debug64/console.o debug64/contract.o debug64/copyops.o debug64/core.o debug64/corectl.o debug64/cred.o debug64/cs_stubs.o debug64/dacf.o debug64/dacf_clnt.o debug64/damap.o debug64/cyclic.o debug64/ddi.o debug64/ddifm.o debug64/ddi_hp_impl.o debug64/ddi_hp_ndi.o debug64/ddi_intr.o debug64/ddi_intr_impl.o debug64/ddi_intr_irm.o debug64/ddi_nodeid.o debug64/ddi_periodic.o debug64/devcfg.o debug64/devcache.o debug64/device.o debug64/devid.o debug64/devid_cache.o debug64/devid_scsi.o debug64/devid_smp.o debug64/devpolicy.o debug64/disp_lock.o debug64/dnlc.o debug64/driver.o debug64/dumpsubr.o debug64/driver_lyr.o debug64/dtrace_subr.o debug64/errorq.o debug64/etheraddr.o debug64/evchannels.o debug64/exacct.o debug64/exacct_core.o debug64/exec.o debug64/exit.o debug64/fbio.o debug64/fcntl.o debug64/fdbuffer.o debug64/fdsync.o debug64/fem.o debug64/ffs.o debug64/fio.o debug64/flock.o debug64/fm.o debug64/fork.o debug64/vpm.o debug64/fs_reparse.o debug64/fs_subr.o debug64/fsflush.o debug64/ftrace.o debug64/getcwd.o debug64/getdents.o debug64/getloadavg.o debug64/getpagesizes.o debug64/getpid.o debug64/gfs.o debug64/rusagesys.o debug64/gid.o debug64/groups.o debug64/grow.o debug64/hat_refmod.o debug64/id32.o debug64/id_space.o debug64/inet_ntop.o debug64/instance.o debug64/ioctl.o debug64/ip_cksum.o debug64/issetugid.o debug64/ippconf.o debug64/kcpc.o debug64/kdi.o debug64/kiconv.o debug64/klpd.o debug64/kmem.o debug64/ksyms_snapshot.o debug64/l_strplumb.o debug64/labelsys.o debug64/link.o debug64/list.o debug64/lockstat_subr.o debug64/log_sysevent.o debug64/logsubr.o debug64/lookup.o debug64/lseek.o debug64/ltos.o debug64/lwp.o debug64/lwp_create.o debug64/lwp_info.o debug64/lwp_self.o debug64/lwp_sobj.o debug64/lwp_timer.o debug64/lwpsys.o debug64/main.o debug64/mmapobjsys.o debug64/memcntl.o debug64/memstr.o debug64/lgrpsys.o debug64/mkdir.o debug64/mknod.o debug64/mount.o debug64/move.o debug64/msacct.o debug64/multidata.o debug64/nbmlock.o debug64/ndifm.o debug64/nice.o debug64/netstack.o debug64/ntptime.o debug64/nvpair.o debug64/nvpair_alloc_system.o debug64/nvpair_alloc_fixed.o debug64/fnvpair.o debug64/octet.o debug64/open.o debug64/p_online.o debug64/pathconf.o debug64/pathname.o debug64/pause.o debug64/serializer.o debug64/pci_intr_lib.o debug64/pci_cap.o debug64/pcifm.o debug64/pgrp.o debug64/pgrpsys.o debug64/pid.o debug64/pkp_hash.o debug64/policy.o debug64/poll.o debug64/pool.o debug64/pool_pset.o debug64/port_subr.o debug64/ppriv.o debug64/printf.o debug64/priocntl.o debug64/priv.o debug64/priv_const.o debug64/proc.o debug64/procset.o debug64/processor_bind.o debug64/processor_info.o debug64/profil.o debug64/project.o debug64/qsort.o debug64/rctl.o debug64/rctlsys.o debug64/readlink.o debug64/refstr.o debug64/rename.o debug64/resolvepath.o debug64/retire_store.o debug64/process.o debug64/rlimit.o debug64/rmap.o debug64/rw.o debug64/rwstlock.o debug64/sad_conf.o debug64/sid.o debug64/sidsys.o debug64/sched.o debug64/schedctl.o debug64/sctp_crc32.o debug64/seg_dev.o debug64/seg_kp.o debug64/seg_kpm.o debug64/seg_map.o debug64/seg_vn.o debug64/seg_spt.o debug64/semaphore.o debug64/sendfile.o debug64/session.o debug64/share.o debug64/shuttle.o debug64/sig.o debug64/sigaction.o debug64/sigaltstack.o debug64/signotify.o debug64/sigpending.o debug64/sigprocmask.o debug64/sigqueue.o debug64/sigsendset.o debug64/sigsuspend.o debug64/sigtimedwait.o debug64/sleepq.o debug64/sock_conf.o debug64/space.o debug64/sscanf.o debug64/stat.o debug64/statfs.o debug64/statvfs.o debug64/stol.o debug64/str_conf.o debug64/strcalls.o debug64/stream.o debug64/streamio.o debug64/strext.o debug64/strsubr.o debug64/strsun.o debug64/subr.o debug64/sunddi.o debug64/sunmdi.o debug64/sunndi.o debug64/sunpci.o debug64/sunpm.o debug64/sundlpi.o debug64/suntpi.o debug64/swap_subr.o debug64/swap_vnops.o debug64/symlink.o debug64/sync.o debug64/sysclass.o debug64/sysconfig.o debug64/sysent.o debug64/sysfs.o debug64/systeminfo.o debug64/task.o debug64/taskq.o debug64/tasksys.o debug64/time.o debug64/timer.o debug64/times.o debug64/timers.o debug64/thread.o debug64/tlabel.o debug64/tnf_res.o debug64/turnstile.o debug64/tty_common.o debug64/u8_textprep.o debug64/uadmin.o debug64/uconv.o debug64/ucredsys.o debug64/uid.o debug64/umask.o debug64/umount.o debug64/uname.o debug64/unix_bb.o debug64/unlink.o debug64/urw.o debug64/utime.o debug64/utssys.o debug64/uucopy.o debug64/vfs.o debug64/vfs_conf.o debug64/vmem.o debug64/vm_anon.o debug64/vm_as.o debug64/vm_meter.o debug64/vm_pageout.o debug64/vm_pvn.o debug64/vm_rm.o debug64/vm_seg.o debug64/vm_subr.o debug64/vm_swap.o debug64/vm_usage.o debug64/vnode.o debug64/vuid_queue.o debug64/vuid_store.o debug64/waitq.o debug64/watchpoint.o debug64/yield.o debug64/scsi_confdata.o debug64/xattr.o debug64/xattr_common.o debug64/xdr_mblk.o debug64/xdr_mem.o debug64/xdr.o debug64/xdr_array.o debug64/xdr_refer.o debug64/xhat.o debug64/zone.o debug64/tty_ptyconf.o debug64/ptms_conf.o debug64/vcons_conf.o debug64/modctl.o debug64/modsubr.o debug64/modsysfile.o debug64/modconf.o debug64/modhash.o
ld: fatal: unsupported ELF machine type: 0xb7
libfdt is GPL/BSD licensed. fdt(1) is GPL licensed.
Note that .fdt files do not include types so one must make assumptions about the property value type based on the name.
http://devicetree.org/Device_Tree_Usage
https://wiki.freebsd.org/FlattenedDeviceTree
https://www.kernel.org/doc/Documentation/arm/Booting
https://www.kernel.org/doc/Documentation/devicetree/booting-without-of.txt
Most of the TLS relocations are missing. This isn't a problem now because we're not doing anything with TLS anyway, but eventually it'd be nice to get this going.
It's still partially talking about ARMv6 & ARMv7.
$ file debug64/xdr.o
debug64/xdr.o: ELF 64-bit LSB relocatable unknown machine Version 1
This function was copied from the 32-bit ARM code. It needs to be updated to produce aarch64 instructions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.