- create the directory structure
mkdir -p tutorial/src/main/java/hello then
touch tutorial/src/main/java/hello/Main.java
- put in the java file
tutorial/src/main/java/hello/Main.java
package hello;
public class Main {| // Note: sqrt -- approximate method for calculating the square root of a number. | |
| double sqrt (double num) | |
| { | |
| double start = 0.0; | |
| double epsilon = 0.1; // Accuracy granularity. | |
| // Find nearest perfect square. | |
| while ((num - start * start) > 0) | |
| start += 1; |
| From 60532f6087d0f3cc20197da1790d2f5cec0ecbee Mon Sep 17 00:00:00 2001 | |
| From: Jesse Nazario <address@hidden> | |
| Date: Sat, 31 Aug 2019 15:35:34 -0300 | |
| Subject: [PATCH] Center lines vertically with line-spacing-vertical-center | |
| When using line-spacing, the new variable line-spacing-vertical-center | |
| can be set to non-nil to center the line content vertically. | |
| --- | |
| src/buffer.c | 13 +++++++++++++ | |
| src/buffer.h | 4 ++++ |
ghidra.jar and place into the lib directory.src/main/java/MyProject.java file
import ghidra.app.script.GhidraScript;
public class MyProject extends GhidraScript {
@Override
public void run() throws Exception {
May only need sudo apt-get install libc6-dev-i386 gcc-multilib g++-multilib
but if there is a version mismatch between this gcc and the x64 gcc then there will be issues.
So check update-alternatives --config gcc
and use that info to find gcc-<version>-multilib and then install it.
credit to https://askubuntu.com/questions/453681/gcc-wont-link-with-m32
| // Credit: https://stackoverflow.com/questions/189725/what-is-a-trampoline-function | |
| #include <stdio.h> | |
| typedef struct _trampoline_data { | |
| void(*callback)(struct _trampoline_data*); | |
| void* parameters; | |
| } trampoline_data; | |
| void trampoline(trampoline_data* data) { |
| /* | |
| * tl;dr: C program initialization, written in C! | |
| * | |
| * This applies to an executable dynamically linked with glibc. | |
| * It is current as of glibc 2.26. | |
| * | |
| * A LOT of information has been omitted for simplicity; hell, | |
| * some of it might be flat-out wrong (I wrote this after about | |
| * 3 hours of experimenting with GDB). If you want to know EXACTLY | |
| * what goes on under the covers, I advise you to read the |
See http://www.sco.com/developers/devspecs/abi386-4.pdf page 54 for diagram. This tells us 1 implementation of the stack layout of a SYSV compliant system (At the moment the only one I am aware of). However the spec. mentions this to only be a potiential implementation that is complient. To quote,
Argument strings, environment strings, and the auxiliary information appear in no specific order within the information block; the system makes no guarantees about their arrangement