It is fairly straightforward to correctly resolve an R_ARM_REL32 relocation as described in
in the "Relocation types" section of ARM ELF Specification
(https://developer.arm.com/documentation/espc0003/1-0/?lang=en). The documentation provides
the following formula:
```
S - P + A
```
where `S` is the value of the symbol (symAddr), `P` is the address of the place being
relocated (relAddr), and `A` is the addend (value extracted from the storage unit being
relocated, in this case).
I encountered the R_ARM_REL32 relocation type as part of my work for building apps written
in Swift for the Flipper Zero. I have manually tested that this relocation works correctly
by building and running multiple apps that depend on this relocation.
Co-authored-by: あく <alleteam@gmail.com>
* GUI: Fix array out of bounds in menu exit
* Gui: fix incorrect empty menu handling
* Gui: add missing item check in menu ok handling
* Gui: remove dead code from menu module
Co-authored-by: あく <alleteam@gmail.com>
* Fix mosgortrans/troika newlines and mark unused variables
* Supress warnings for TODOs that don't need a ticket
Co-authored-by: あく <alleteam@gmail.com>
* Examples: remove unused context
* FuriHal: add simple ADC API
* Examples: add ADC example app
* FuriHal: add extended configuration options for ADC API
* FuriHal: add ADC clock configuration, fix calibration routine for single ended mode, new optimized parameters, documentation.
* FuriHal: add FuriHalAdcChannelTEMPSENSOR sampling time note
* FuriHal: update FuriHalAdcChannelVBAT description.
* FuriHal: use insomnia while ADC is acquired.
* Examples: cleanup example_adc a little bit
* New types for felica poller
* New functions for felica data transmissions
* Felica memory map extended with new fields
* Init/deinit of mbedtls context added for felica encryption
* Functions for session key and mac calculations added
* Raw felica_poller implementation added
* Removed MAC type parameter from check_mac function
* Replaced all data fields needed for auth with context structure
* Clean up felica_poller.c
* Now RC block is filled with random numbers
* New parameter for counting well-read blocks
* Some cleanups
* Felica file save and load logic added
* Now we use card key from context for session key calculation
* Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1
* New felica poller event added
* Moved some data structions to public namespace
* FelicaAuthenticationContext struct moved to felica.h
* Field type and name changed for better ones
* Helper functions for felica_auth added to the app
* New scene for felica card key input added
* Logic for felica key input added
* Auth context request processing added
* Added block index definitions and replaced all index numbers with them
* More macro defines
* Replace nesting with do while block
* New function for write operations mac calculation added
* Replace nesting with do while block
* Make functions static for now because they are used internally
* Wrote some comments
* Raw felica render implementation
* New felica scenes
* Adjusted felica dump rendering according design requirements
* New felica scene added
* Helper for switching scene during unlock added
* Added warning scene and transfer to it
* Moved unlock scene logic to separate files
* Magic number changed
* New felica render logic
* Felica scenes adjusted according to design requirements
* Felica poller cleanups
* Some asserts added and some fixed
* Replcaed asserts to checks in public api
* Fixed pvs warnings in felica_poller
* New event for felica_poller added for incomplete read actions
* Handling of new poller event added
* Update SConscript with felica files
* Update api_symbols.csv with felica functions
* Sync API versions
Co-authored-by: あく <alleteam@gmail.com>
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (#3403),
2024-03-25) changed the life-cycle of the bad_usb_script object, so that
the bad_usb_script is allocated when entering the work scene, and freed
when going to the config scene. It also made it so that the keyboard
layout always gets reloaded when entering the work scene.
The logic of the layout config scene, however, assumes that it still
needs to reload the keyboard layout after selecting it. The keyboard
layout data is stored within bad_usb_script however, which is NULL when
within the layout config scene.
The fix is simple. Since we are now reload the keyboard layout anyway
when entering the work scene, we can just remove this extra call.
Resolves: #3552
* now shows failed login attempt count
* fixed the memory leaking
* made some text changes
* removed second allocation of the furi string
* cleaned up code
* Changed Position of the Wrong Attempts Text + It removes if you typed an arrow
* aligned text to the center and switched to furi_string_reset insted of furi_string_set_str("")
* fixed weird behavior
* Desktop: cleanup pin scene code, better reporting on transition between states
Co-authored-by: あく <alleteam@gmail.com>
* SavedStruct: Replace saved_struct_get_payload_size with saved_struct_get_metadata
This new function can obtain the magic value, version and payload size
all at once. This makes the function useful e.g.
for backwards compatibility.
* SavedStruct: const-qualify saved_struct_save
* Toolbox: add saved struct documentation
Co-authored-by: あく <alleteam@gmail.com>
* js command
* made the js command exit when there's an error
* JS CLI: moved to js_app
* JS: abortable cli invocations
* JS: less debug logging in console logs, fix storage descriptor leak in cli
Co-authored-by: Milk-Cool <milan-pl@mail.ru>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>